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

2020-05-25 Thread Brian Candler
That's almost right. Firstly, all these settings go under "relabel_configs", none under "metric_relabel_configs" Secondly, you need a final rule to set the __address__ to the actual target you want to scrape: - source_labels: ['__address__'] regex: '(.*);(.*);(.*);(.*)'

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

2020-05-24 Thread Juan Rosero
Thanks, Brian. I'm spinning my wheels here and getting all sorts of errors in Prometheus with different relabeling configurations. I've been reading on the topic but relabeling is still a bit obscure to me. - targets: - server1:9117;ad-1;domain-1;emea-1 -

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

2020-05-23 Thread Brian Candler
It depends where the 'ad', 'dom', 'reg' information comes from. You can embed that information in the target, e.g. - targets: - server1:9117/ad-1/domain-1/emea-1 - server2:9117/ad-2/domain-2/emea-1 and then use rewriting rules to extract each of the parts in turn into separate labels.

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

2020-05-22 Thread Juan Rosero
Thanks, Julien. I'm wondering if there is way to do this with relabeling. Thank you. On Thursday, May 21, 2020 at 2:04:57 PM UTC-7, Julien Pivotto wrote: > > Hi, > > On 21 May 14:00, Juan Rosero wrote: > > Hello, > > > > I'm trying to add location labels to my Apache Exporter metrics and >

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

2020-05-21 Thread Julien Pivotto
Hi, On 21 May 14:00, Juan Rosero wrote: > Hello, > > I'm trying to add location labels to my Apache Exporter metrics and other > exporters that don't expose them when Prometheus scrapes them from the > server nodes. Here is my Prometheus job and the labels (ad, dom, reg) that > I'm looking to