zalando / zalando/postgres-operator
How can I change the Patroni log level?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
For my production postgres clusters I'd like to limit log messages to a reasonable amount. Therefore I want to get rid off all the Patroni log messages that are logged - about every 10 seconds - at the INFO level, e.g.:
11/9/2020 5:27:22 PM 2020-11-09 16:27:22,345 INFO: Lock owner: cluster-name-0; I am cluster-name-0
11/9/2020 5:27:22 PM 2020-11-09 16:27:22,401 INFO: no action. i am the leader with the lock
I found in the Patroni documentation that I can set the environment variable PATRONI_LOG_LEVEL, but I don't know how I can achieve this when Patroni is managed with the Postgres Operator (I use version v1.5.0). I tried setting it in the ConfigMap that I also use to configure WAL backups, but that hadn't any effect. Can anybody point me in the right direction?
Besides these Patroni messages I also see the following message about every 30 seconds:
2020-11-09 16:27:21.335 46 LOG {ticks: 0, maint: 0, retry: 0}
I don't know where it is coming from and how to suppress these message. Again, any help is appreciated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Postgres Operator v1.5.0 configuration documentation and its handling of ConfigMaps and environment variables. Verify whether PATRONI_LOG_LEVEL can be passed to Patroni and identify the source of the {ticks: 0, maint: 0, retry: 0} message. Done means documenting the supported configuration and how to suppress both message types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- databases, devops
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100