global:
scrape_interval: 1s
evaluation_interval: 1s
scrape_configs:
- job_name: nomad_metrics
metrics_path: /v1/metrics
params:
format: ['prometheus']
consul_sd_configs:
- server: 'xxx'
services: ['nomad', 'nomad-client']
relabel_configs:
- source_labels: ['__meta_consul_tags']
regex: '(.*)http(.*)'
action: keep
- job_name: 'webserver'
consul_sd_configs:
- server: 'xxx'
services: ['webserver']
relabel_configs:
- source_labels: ['__address__']
regex: 'xxx'
action: replace
target_label: '__address__'
replacement: 'xxx'
- job_name: consul_server_metrics
metrics_path: /v1/agent/metrics
params:
format: ['prometheus']
static_configs:
- targets: ["xxx", "xxx", "xxx"]
That's my prometheus config; I didn't write most of it so I don't
understand most of it... But yeah, consul_sd_configs appears in there.
And yes, Consul registers the services by their internal addresses
--
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/04cc119a-480e-4660-a9c7-92381b06bd10o%40googlegroups.com.