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: 'instance'
      replacement: '$1'
    - source_labels: ['__address__']
      regex: '(.*);(.*);(.*);(.*)'
      target_label: 'ad'
      replacement: '$2'
    - source_labels: ['__address__']
      regex: '(.*);(.*);(.*);(.*)'
      target_label: 'dom'
      replacement: '$3'
    - source_labels: ['__address__']
      regex: '(.*);(.*);(.*);(.*)'
      target_label: 'reg'
      replacement: '$4'
    - source_labels: ['__address__']
      regex: '(.*);(.*);(.*);(.*)'
      target_label: '__address__'
      replacement: '$1:9117'

On Monday, May 25, 2020 at 11:00:33 PM UTC-7, Brian Candler wrote:
>
> 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 __address__ that 
> is scraped.
>

-- 
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/27c4da7f-86d8-4237-879f-79e5f087a094%40googlegroups.com.

Reply via email to