【问题标题】:Prometheus Probe CRD doesn't probe targetsPrometheus Probe CRD 不探测目标
【发布时间】:2021-03-04 23:40:07
【问题描述】:

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

我能够在 Prometheus 导出器的值文件中使用 Blackbox 导出器和 AdditionalScrapeConfigs 探测目标,但它不适用于 Probe CRD。

这是我的 Probe 自定义对象配置,

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 上运行。有人可以告诉我这里缺少什么吗?

【问题讨论】:

    标签: kubernetes monitoring prometheus prometheus-operator prometheus-blackbox-exporter


    【解决方案1】:

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

    probeNamespaceSelector: {}
    probeSelector: {}
    

    更多关于配置的细节在https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md

    【讨论】:

    • 我已经尝试在我的普罗米修斯值图表文件中设置prometheus: prometheusSpec: probeNamespaceSelector: {} probeSelector: {},这是因为它仍然不适合我
    【解决方案2】:

    你需要指定release: name_of_your_promy_helm_release标签

    【讨论】:

      猜你喜欢
      • 2021-07-02
      • 2019-12-16
      • 1970-01-01
      • 1970-01-01
      • 2022-12-17
      • 1970-01-01
      • 1970-01-01
      • 2020-01-02
      • 2020-02-12
      相关资源
      最近更新 更多