Hi Prometheus USers,
We have list of targets dynamically updated in the file called.target.yaml
- tagets
- host1.abc.com
- host2.abc.com
- host3.abc.com
We would like to use targets.yaml file in multiple jobs as file_sd_configs
(service discovery).
We want to scrape on different ports using the same targets file as below.
How to achieve it?
- job_name: get-port-9001 //want to read metrics for port 9001
file_sd_configs:
- files:
- targets.yaml
- job_name: get-port-9002 //want to read metrics for port 9002
file_sd_configs:
- files:
- targets.yaml
- job_name: get-port-9003 //want to read metrics for port 9003
file_sd_configs:
- files:
- targets.yaml
Thanks
Sandeep
--
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/97463959-a6f8-4af4-8bcd-9926c3cdda7a%40googlegroups.com.