prometheus-nats-exporter
prometheus-nats-exporter copied to clipboard
support custom labels to be set through command line flag
It's really convenient for devops to monitor and manage different nats clusters on the cloud if custom labels are supported.
There is a related issue (https://github.com/nats-io/prometheus-nats-exporter/issues/86) about this concern, but only prefix is supported.
My suggestion is using another flag to make users set what labels to be added for all metrics, where these labels are all constant labels.
Thanks @shohi could you share an example of a custom label to be added to validate? We'd gladly update to make it more convenient :)
Sure. To be simple, label pairs should be provided, e.g.
--custom_labels="site=test,profile=dev"
then the output metrics should contain all these label pairs, like the followings
nats_varz_connections{app="nats-cluster",instance="10.184.140.1:8080",job="kubernetes-pods",site="test", profile="dev", ...}
Thanks that is helpful :)
Sounds good to me too.