The 'instance' label isn't set until *after* relabelling.
So you need to use source_labels: [__address__]
After relabeling, the instance label is set equal to the __address__ label
- but only if you haven't already created an instance label yourself. This
gives you an opportunity to set the 'instance' label to something more
meaningful. It also lets you keep the exporter port number out of the
label: e.g.
- source_labels: [__address__]
target_label: instance
- source_labels: [__address__]
replacement: '${1}:9100'
target_label: __address__
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/cb5b185f-e034-402a-be0c-c966519d3e7a%40googlegroups.com.