Perhaps I confused you by putting both example.com and example.net, but it 
was to show that you that your multiple exporters could poll multiple hosts.

There are two jobs: one does replacement: blackbox-eu:9449 and one 
does replacement: blackbox-us: 9449.  If you only have two exporters then 
this is a reasonable way to do it.

If that's not what you're looking for, then you can get cleverer with the 
rewrite logic.  For example:

- job_name: blackbox
    metrics_path: /probe
    static_configs:
      - targets:
          - example.com,http_text_html,blackbox-eu:9449
          - example.com,http_text_html,blackbox-us:9449
    relabel_configs:
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$1'
        target_label: instance
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$1'
        target_label: __param_target
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$2'
        target_label: module
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$2'
        target_label: __param_module
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$3'
        target_label: exporter
      # This one must be last
      - source_labels: [__address__]
        regex: '^(.*),(.*),(.*)$'
        replacement: '$3'
        target_label: __address__

You need the "exporter" label so that you get different timeseries for the 
different probes with the same target.

-- 
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/742df2f8-c35e-4e26-87fe-ebea95bcc443o%40googlegroups.com.

Reply via email to