On Fri, 19 Feb 2021 at 16:35, Alain delbot <[email protected]> wrote:
> how configure the scrapping to call only nodes that the check service is 
> passed ?


Per
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
there is a __meta_consul_health

Which you can use in the relevant scrape config with something like:

- job_name: consul-jobs
  consul_sd_configs:
    ...
  relabel_configs:
    - source_labels: [__meta_consul_health]
      action: keep
      regex: passing

Although it may be better to action: drop with critical, rather than
only looking at passing ones depending on what you need to happen for
other states.

David

-- 
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/CAP9KPhDwy2Y3EP-4jT1k9Z0_joO1f1jAbA%3D%2BpF4EPpLmzfzYog%40mail.gmail.com.

Reply via email to