Allow custom service names for exporters
For the repeatable db provisioning project we are using the following Prometheus exporters:
- node-exporter
- postgresql-exporter
(We are not currently using Omnibus pgbouncer because of #4796 (closed))
For at least these two exporters, we would like to be able to configure custom service names/tags when they are registered in Consul. This will allow us to have a single Consul server, servicing multiple database shards.
Note that for Patroni, which also registeres itself with Consul, we can set patroni['scope']
which will set the service name.
For example, if we have two shards CI
and main
:
- node-exporter-main
- node-exporter-ci
- postgresql-exporter-main
- postgresql-exporter-ci
- postgresql-main [master/replica]
- postgresql-ci [master/replica]
Edited by John Jarvis