Hi !
I installed blackbox_exporter in two different hosts… Both are exporting data to prometheus and are correctly installed and working, since I can see accessing 9915 port.
Now, I would like to select which host I would like to see blackbox_exporter data, using a grafana dashboard. My first doubt is, how to configure prometheus yml file, since I have two blackbox_exporters… Should I config 2 jobs, like the one below? Or I can in yml file map two different sources, like: replacement: [myaddress_1.com:9115, replacement: myaddress_2.com:9115]
- job_name: “pingtime”
metrics_path: /probe
params:
module: [icmp_ipv4]
scrape_interval: 30s
static_configs:
- targets:
- mytarget.com
relabel_configs:
- source_labels: [address]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: address
replacement: myaddress_1.com:9115
And so, after that how should I set grafana dashboard variables to allow me to select from which source I will get blackbox_exporter data.
Thank you !!