[英]Prometheus Probe CRD doesn't probe targets
我正在使用 Prometheus Probe CRD 和 Blackbox 導出器來抓取 static 個目標。 但是,當我檢查 Blackbox exporter 時,我根本沒有看到指定的目標被探測到。
我能夠在 Prometheus 導出器的值文件中使用 Blackbox 導出器和 additionalScrapeConfigs 來探測目標,但它不適用於 Probe CRD。
這是我的探針自定義 object 配置,
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
配置了適當的匹配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。
所以我想,如果您的選擇器是正確的,那肯定是缺少權利。 確保正確設置了ServiceAccount
、 ClusterRole
和ClusterRoleBinding
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.