-
Notifications
You must be signed in to change notification settings - Fork 55
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
Feature: add option to export multiple pgbouncer instances #182
base: master
Are you sure you want to change the base?
Feature: add option to export multiple pgbouncer instances #182
Conversation
…one exporter instance. Signed-off-by: Maikel Poot <[email protected]>
af1f42f
to
dba0cb1
Compare
Force-push was to add sign-off to the commit |
@SuperQ Can i do something to add some progress the review process? |
@SuperQ : This is definitely a useful and most wanted feature. |
Sorry, but this is not the correct way to implement multi-target support. I would be happy to support multiple pgbouncer instances from one exporter, but it needs to follow exporter design conventions. Please read the multi-target exporter pattern guide. For an example, here is how we added it to the postgres_exporter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please implement multi-target support.
Why this PR
We TCP load balance our connections over multiple (4+) pgbouncer instances/processes to increase stability and performance. We would like to switch from our own exporter to the prometheus-community exporter but would like to run only one exporter instance instead of an exporter per pgbouncer instance.
What does the PR do
This PR will add the option to export multiple pgbouncer instances with one exporter instance using a yaml config file.
All the options are documented within the example config.yaml within this repo.
This config file also add the option to start the exporter even if the connection fails on startup.
Extra labels
To differentiate the metrics for each pgbouncer instances, you MUST configure a unique label/value set for each instance.
As shown in the example, this can be as simple as setting a unique
pgbouncer_instance
value for each instance.The extra labels per instance are merged with the common extra_labels where the instance value has precedence over the common value
Requirements:
If there requirements are not met the exporter will fail startup.
Example
When using the config file:
you now get 3
pgbouncer_up
metrics: