普罗米修斯探针CRD不探测目标



我正在使用Prometheus Probe CRD和Blackbox导出器来刮取静态目标。但是,当我查看Blackbox exporter时,我根本没有看到特定的目标被探测到。

我能够使用Blackbox导出器和Prometheus导出器的值文件中的额外ScrapeConfigs来探测目标,但它不适用于probe CRD。

这是我的探测器自定义对象配置,

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导出器服务正在9115端口上运行。有人能告诉我我在这里缺了什么吗?

确保在kind: Prometheus定义中配置了适当的匹配:

probeNamespaceSelector: {}
probeSelector: {}

有关配置这些的更多详细信息,请参阅https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md

您需要指定release: name_of_your_promy_helm_release标签

刚刚在这里检查了我的工作配置,我在目标url上没有协议模式:

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

但我只是在前面加了一个https://。它仍然被选中,但一直返回http状态0。

所以我想,如果你的选择者是正确的,它肯定会失去权利。确保已正确设置了ServiceAccountClusterRoleClusterRoleBinding

最新更新