> When I am using static config then it shows fine but when I am using
service discovery for status of service or pod some are coming up some are
down
Then clearly you're not scraping/probing the same endpoints as you did with
the static config.
The easiest way to check is to go to the Prometheus web interface and look
at the "Status > Targets" page and see what *actual* targets you're
probing: first with the static config, and then secondly with the SD config
(actually you can do both at the same time, but configure them as separate
jobs so you can distinguish them by the "job" label). The first column
shows the URL being scraped and the URL params being passed ("module" and
"target" are the ones that need to be set for blackbox_exporter, of course).
If you can show your static config, and the service discovery config, the
problem might be clearer. My guess is the SD discovery isn't returning
data in the form that you expect, or that your rewrite rules aren't working
in the way that you expect.
On Friday, 17 March 2023 at 15:23:28 UTC dikshant rai wrote:
> Hi,
> I tried to configure blackbox exporter for checking api status with
> prometheus on kubernetes. When I am using static config then it shows fine
> but when I am using service discovery for status of service or pod some are
> coming up some are down. I used telnet to check connectivity as well that
> is fine but still don't know where it is failing.
> Please help.
>
--
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/02ef4935-44e3-4554-82cd-26da54f30e1bn%40googlegroups.com.