Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable printing stats to log #287

Closed
wants to merge 2 commits into from

Conversation

@weastur
Copy link

@weastur weastur commented Apr 18, 2018

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
Contributor

@petere 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.

@weastur
Copy link
Author

@weastur weastur commented Sep 11, 2018

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 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants