I would like to search for server in my prod and preprod env. Currently
I'm using a single SRV record to do this in prod. Works great!
But I want to do this in preprod from prod. Here is my config:
- job_name: "node"
metrics_path: /metrics
dns_sd_configs:
- names:
- "metrics"
relabel_configs:
- source_labels: ['__meta_dns_name']
regex: 'metrics\.(.+?)\..+?\.andrew1\.us'
target_label: 'zone'
replacement: '$1'
- source_labels: ['__meta_dns_name']
regex: 'metrics\..+?\.(.+?)\.andrew1\.us'
target_label: 'job'
replacement: '$1'
- source_labels: ['__meta_dns_name']
regex: 'metrics\.(.+?)\..+?\.andrew2\.us'
target_label: 'zone'
replacement: '$1'
- source_labels: ['__meta_dns_name']
regex: 'metrics\..+?\.(.+?)\.andrew2\.us'
target_label: 'job'
replacement: '$1'
Will this work the way I have it? I do have forwarding set up and I have
tested. It is working.
--
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/fbd23988-2f52-402b-803c-18c89eab2342n%40googlegroups.com.