Filtering targets to show endpoint with exporter present

19 views
Skip to first unread message

ellis...@googlemail.com

unread,
Sep 28, 2020, 7:43:14 AM9/28/20
to Prometheus Users
I have an environment built with a number of exporters present. In the target menu though I am seeing a number of endpoints present showing the state as down, this because the actual endpoint doesn't have an exporter running. I think this is because of my config in the prometheus.yml but i cannot be sure.

Can anyone help me fine tune the filter?

Brian Candler

unread,
Sep 28, 2020, 11:33:28 AM9/28/20
to Prometheus Users
You are scraping targets where the exporter doesn't exist.  This means you have two options if you don't want to see endpoints as down:

1. Install the exporters on those targets
2. Change your prometheus.yml config so that you only scrape those exporters on the relevant targets.

Option (2) involves changing the list of targets in your scrape jobs.  For example: if you are using static_configs or file_sd_configs, then you simply edit the list of targets.  If you are using some other service discovery mechanism, then you need some way to distinguish between those hosts which should be running a given exporter, and those which shouldn't (e.g. if you are scraping k8s pods, then you might set pod labels)

If you want further help with configuration, then I suggest you start by posting your existing prometheus.yml and explain how you want to change its behaviour.
Reply all
Reply to author
Forward
0 new messages