what did you say i understand.
however there is the blackbox_exporter and the files site01.yml and site02.yml in file_sd_configs, I need each one to direct to an alert rule. then it is easy to target the alert rules matching the alertmanager routes.
You can set labels within the YAML or JSON files used by file_sd.
See
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config
You could add a label in each file with two different values (so
value 1 in file 1 and value 2 in file 2). You can then use that
label in your alerting rules in a way that then allows you to
direct the alerts as desired in the Alertmanager routing as
mentioned.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/469913fc-8ab0-4a8a-b2fb-dfb3ea03dad2n%40googlegroups.com.
I read the documentation, but I have no idea how to assemble this part.would you have an example?
Assuming YAML your file is currently something like
targets:
- target1
- target2
You'd just add a labels section as well
labels:
label1: value
label2: value
So, in total
targets:
- target1
- target2
labels:
label1: value
label2: value
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ed14bca4-c803-42f2-b9aa-c786c33f554an%40googlegroups.com.