[prometheus-users] Re: Adding extra labels to metrics

2020-05-26 Thread Juan Rosero
I see what you mean so I added it back into the mix. Thanks for the tip. Really appreciated. - targets: - server1;ad-1;domain-1;emea-1 - server2;ad-2;domain-2;emea-1 relabel_configs: - source_labels: ['__address__'] regex: '(.*);(.*);(.*);(.*)' target_label: 'ins

[prometheus-users] Re: Adding extra labels to metrics

2020-05-25 Thread Brian Candler
Glad it's working! Note that if you add an extra step to set the "instance" label explicitly (which you had originally), then this disables prometheus' default behaviour of copying __address__ to instance. Hence you can keep the port number out of the instance label, whilst keeping it in the _

[prometheus-users] Re: Adding extra labels to metrics

2020-05-25 Thread Juan Rosero
Awesome! That worked! Thanks for everything. Leaving the solution here. - targets: - server1;ad-1;domain-1;emea-1 - server2;ad-2;domain-2;emea-1 relabel_configs: - source_labels: ['__address__'] regex: '(.*);(.*);(.*);(.*)' target_label: 'ad' replacement: '$