Prometheus Probe CRD doesn't probe targets

11/21/2020

I am using Prometheus Probe CRD and Blackbox exporter to scrape static targets. But, when I checked in Blackbox exporter, I don't see specified targets being probed at all.

I was able to probe targets using Blackbox exporter and additionalScrapeConfigs in values file of Prometheus exporter but it doesn't work with Probe CRD.

Here is my Probe custom object config,

kind: Probe
metadata:
  name: probe-crd
  namespace: prometheus
spec:
  jobName: probe-crd
  prober:
    url: prometheus-blackbox-exporter:9115
  targets:
    staticConfig:
      static:
      - https://www.google.com

Blackbox exporter service is running on port 9115. Can someone please let me know what I am missing here?

-- Amruth
kubernetes
monitoring
prometheus
prometheus-blackbox-exporter
prometheus-operator

3 Answers

3/4/2021

You need to specify release: name_of_your_promy_helm_release label

-- Evgenii Pavlov
Source: StackOverflow

2/16/2022

Just checked my working config here and I have no protocol schema on the target url:

targets:
  staticConfig:
    static:
    - www.google.com

But I just added one with https:// in front. It still got picked up, but returned http status 0 all the time.

So I guess, if you have your selectors correct, it is surely missing rights. Make sure you have your ServiceAccount, ClusterRole and ClusterRoleBinding correctly setup.

-- Markus
Source: StackOverflow

11/23/2020

Make sure that you have the appropriate matching configured in your kind: Prometheus definition(s):

probeNamespaceSelector: {}
probeSelector: {}

More details on configuring those is in https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md

-- kungfuchicken
Source: StackOverflow