Feature: add option to export multiple pgbouncer instances#182
Feature: add option to export multiple pgbouncer instances#182maikelpoot wants to merge 7 commits intoprometheus-community:masterfrom
Conversation
…one exporter instance. Signed-off-by: Maikel Poot <maikel.poot@topicus.nl>
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: |
SuperQ
left a comment
There was a problem hiding this comment.
Please implement multi-target support.
…rget_protocol # Conflicts: # go.sum
Signed-off-by: Maikel Poot <maikel.poot@topicus.nl>
Signed-off-by: Maikel Poot <maikel.poot@topicus.nl>
Signed-off-by: Maikel Poot <maikel.poot@topicus.nl>
078ba2b to
29a805e
Compare
|
due to some rebase problems getting old commits to be signed-off, |
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_instancevalue 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_upmetrics: