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: '(.*);(.*);(.*);(.*)'
      target_label: '__address__'
      replacement: '$1'

A useful pattern is that you can take the port out of the 'targets' file, 
and apply it here - this gives you meaningful instance labels 
<https://www.robustperception.io/controlling-the-instance-label>.

    - source_labels: ['__address__']
      regex: '(.*);(.*);(.*);(.*)'
      target_label: '__address__'
      replacement: '$1:9117'

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e2cf9374-4d65-4a99-9c78-888814e7ac74%40googlegroups.com.

Reply via email to