Hello! I have multiple remote machines that are running both cadvisor and node-exporter. These machines are fairly locked down so I cannot open more ports on them to expose the external ports of the cadvisor and node-exporter containers. To get around opening ports, I setup a nginx proxy on every remote machine so I can proxy each requests from prometheus to cadvisor and node-exporter. I am wondering if I can specify multiple metrics_path
for a single job. Heres an example of the idea as a prometheus config file.
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: remote machine 1
static_configs:
- targets: ['remote_machine_1_ip:8080']
- metrics_path: ['/metrics/cadvisor', '/metrics/nodeexporter']
- job_name: remote machine 2
static_configs:
- targets: ['remote_machine_2_ip:8080']
- metrics_path: ['/metrics/cadvisor', '/metrics/nodeexporter']
- job_name: remote machine 3
static_configs:
- targets: ['remote_machine_3_ip:8080']
- metrics_path: ['/metrics/cadvisor', '/metrics/nodeexporter']
I believe this question is asking pretty much the same thing.
Please let me know if I can provide anymore info or if im not being clear in what im asking, thank you!