consul_exporter icon indicating copy to clipboard operation
consul_exporter copied to clipboard

Add IP address label

Open alkalinecoffee opened this issue 6 years ago • 0 comments

Adds the IP address label to the metrics.

Our use case is that since many of our nodes are not yet hooked up to consul, our alerting/visualization tools are tied to the node's IP address rather than consul node name, so having consul-exporter provide only the consul host name at this time is not of value.

In Prometheus, the following overwrites the instance label value with the node's address value, where applicable:

metric_relabel_configs:
  - source_labels: [address]
    target_label: instance
    action: replace

alkalinecoffee avatar Apr 30 '18 20:04 alkalinecoffee