Prometheus Probe CRD doesn't probe targets

4.4k views Asked by At

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?

3

There are 3 answers

1
kungfuchicken On

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

0
Evgenii Pavlov On

You need to specify release: name_of_your_promy_helm_release label

0
Markus On

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.