Skip to content

Add option to disable printing stats to log#287

Closed
psapezhka wants to merge 2 commits intopgbouncer:masterfrom
Synesis-LLC:log-stats
Closed

Add option to disable printing stats to log#287
psapezhka wants to merge 2 commits intopgbouncer:masterfrom
Synesis-LLC:log-stats

Conversation

@psapezhka
Copy link

Currently many of users of pgbouncer don't use logs to monitor it. For example we are using influxdb+grafana+custom-plugin to collect stats and display it to dashboard. So we absolutely don't need printing stats to log. So I added ability to disable this behavior(by default printing is on). Doc has been updated to. Additionally stats_period was moved from "Log settings" to "General setting" to reflect that this property means stats refreshing period - not only period of writing info to log.

@petere petere self-assigned this Jul 26, 2018
@petere
Copy link
Member

petere commented Sep 11, 2018

In the way you have implemented it, if stats logging is disabled, we would still set the timer and compute all the stats but then just not print them. That seems wasteful. The effect of disabling this functionality should be that the timer is not set to begin with.

You could also just set stats_period to a very large value, so that the log entry rarely happens.

@psapezhka
Copy link
Author

Hello again. As I mentioned above, we are using stats in form of grafana dashboards. So stats are something that we need. But absolulty not in our logs.

@curlup
Copy link

curlup commented Sep 24, 2018

I see a reason in @psapezhko request - average stats are still needed to be counted but no need to log them, as external monitoring tool will collect them regularly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants