Consul Exporter
Export Consul service health to Prometheus.
To run it:
make
./consul_exporter [flags]
Flags
./consul_exporter --help
consul.server
: Address (host and port) of the Consul instance we should
connect to. This could be a local agent (localhost:8500
, for instance), or
the address of a Consul server.
web.listen-address
: Address to listen on for web interface and telemetry.
web.telemetry-path
: Path under which to expose metrics.
Useful Queries
Are my services healthy?
min(consul_catalog_service_node_healthy) by (service)
Values of 1 mean that all nodes for the service are passing. Values of 0 mean at least one node for the service is not passing.
What service nodes are failing?
sum by (node, service)(consul_catalog_service_node_healthy == 0)