Each group of targets in your SD file can have both 'targets' and 'labels' 
keys. The 'labels' are applied to all targets in that particular group. For 
example:

- targets:
    - foo 1.2.2.2
    - bar 2.2.2.2
  labels:
    module: icmp
- targets:
    - baz http://3.3.3.3
    - qux http://4.4.4.4
  labels:
    module: http_2xx

Then, in the rewriting rules I gave you, one of the rules was this:

      - source_labels: [module]
        target_label: __param_module

This copies the "module" label to "__param_module", which is used as the 
HTTP query parameter in the scrape of blackbox_exporter.

Doing it this way means you only need a single scrape job, even when using 
different blackbox modules with different targets. Also, you can set other 
labels to categorise your targets, like "env: prod" say, which can be used 
in queries, alerting rules etc.

-- 
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/f701afa7-1dfd-4365-9c30-7a4aaac0d478n%40googlegroups.com.

Reply via email to