- job_name: 'consul_metrics'
consul_sd_configs:
- server: 'x.x.x.x:8500'
services:
- 'telemetry'
relabel_configs:
- source_labels: ['__meta_consul_address']
target_label: __address__
replacement: '${1}/v1/agent/metrics?format=prometheus'
anyone can help? thanks in advance!
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1b28ae68-c52d-4d18-8987-3acf4ab155e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- job_name: 'consul_metrics'
metrics_path: '/v1/agent/metrics'
params:
format : ['prometheus']
consul_sd_configs:
- server: 'xx.xx.xx.xx:8500'
services:
- 'telemetry'
You just have to set the metrics_path parameter to "/v1/agent/metrics?format=prometheus" at the job configuration level. No need for relabeling here.
On Thu, May 24, 2018 at 9:01 AM, <ofs...@gmail.com> wrote:
Hi guys, I know consul 1.1 has supported prometheus metrics using /v1/agent/metrics?format=prometheus , but I can not relabel to this format, there's some error message like this "err="instance 0 in group telemetry: \"xx.xx.xx.xx/v1/agent/metrics?format=prometheus:80\" is not a valid hostname"", my configuration like below:- job_name: 'consul_metrics'
consul_sd_configs:
- server: 'x.x.x.x:8500'
services:
- 'telemetry'
relabel_configs:
- source_labels: ['__meta_consul_address']
target_label: __address__
replacement: '${1}/v1/agent/metrics?format=prometheus'
anyone can help? thanks in advance!
--
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-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.