我使用 helm(在“monitoring”命名空间中)将 kube-prometheus-stack 15.3.1 安装到 GKE 集群中。我使用values.yaml
来打开某些组件的入口,并将 SMTP 信息和接收者详细信息添加到警报管理器中。在大多数情况下,一切似乎都很好,除了 Prometheus 发出了许多警报,而且我没有收到任何警报电子邮件。
一个触发警报是:
PrometheusNotConnectedToAlertmanagers
Prometheus 监控/prometheus-kube-prometheus-stak-prometheus-0 没有连接到任何Alertmanagers
另一个是:
PrometheusOperatorSyncFailed
监控命名空间中的控制器警报管理器无法协调 1 个对象。
我还尝试打开警报管理器的入口并指向alerts.mydomiain.com
它,但是当我尝试任何 GET 请求(例如alerts.mydomain.com/v2/status
)时,我总是会收到 502 服务器错误。
我需要做什么才能让我的 alertmanager 正常工作?
这是输出kubectl get pods,svc,daemonset,deployment,statefulset -n monitoring
:
NAME READY STATUS RESTARTS AGE
pod/kube-prometheus-stack-grafana-58f7fcb497-hm72h 2/2 Running 0 30h
pod/kube-prometheus-stack-kube-state-metrics-6d588499f5-d957b 1/1 Running 0 2d3h
pod/kube-prometheus-stack-operator-54f89674c9-k8ml7 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-22vpd 1/1 Running 0 3h57m
pod/kube-prometheus-stack-prometheus-node-exporter-2qsl9 1/1 Running 0 3h57m
pod/kube-prometheus-stack-prometheus-node-exporter-4d27n 1/1 Running 0 7h36m
pod/kube-prometheus-stack-prometheus-node-exporter-7rlnk 1/1 Running 0 4h47m
pod/kube-prometheus-stack-prometheus-node-exporter-7xlf4 1/1 Running 0 4h51m
pod/kube-prometheus-stack-prometheus-node-exporter-9mfnt 1/1 Running 0 3h57m
pod/kube-prometheus-stack-prometheus-node-exporter-9zblf 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-bdcjj 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-bs54w 1/1 Running 0 4h47m
pod/kube-prometheus-stack-prometheus-node-exporter-fp95h 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-h4zhw 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-pz8js 1/1 Running 0 3h58m
pod/kube-prometheus-stack-prometheus-node-exporter-rrrhk 1/1 Running 0 27h
pod/kube-prometheus-stack-prometheus-node-exporter-rszlt 1/1 Running 0 2d3h
pod/kube-prometheus-stack-prometheus-node-exporter-s62wq 1/1 Running 0 4h47m
pod/kube-prometheus-stack-prometheus-node-exporter-w9dmb 1/1 Running 0 5h32m
pod/kube-prometheus-stack-prometheus-node-exporter-xqmxk 1/1 Running 0 4h51m
pod/prometheus-kube-prometheus-stack-prometheus-0 2/2 Running 1 30h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kube-prometheus-stack-alertmanager NodePort 10.125.4.161 <none> 9093:30903/TCP 2d3h
service/kube-prometheus-stack-grafana NodePort 10.125.7.177 <none> 80:32444/TCP 2d3h
service/kube-prometheus-stack-kube-state-metrics ClusterIP 10.125.2.56 <none> 8080/TCP 2d3h
service/kube-prometheus-stack-operator ClusterIP 10.125.4.171 <none> 443/TCP 2d3h
service/kube-prometheus-stack-prometheus NodePort 10.125.13.11 <none> 9090:30090/TCP 2d3h
service/kube-prometheus-stack-prometheus-node-exporter ClusterIP 10.125.10.231 <none> 9100/TCP 2d3h
service/prometheus-operated ClusterIP None <none> 9090/TCP 2d3h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/kube-prometheus-stack-prometheus-node-exporter 17 17 17 17 17 <none> 2d3h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kube-prometheus-stack-grafana 1/1 1 1 2d3h
deployment.apps/kube-prometheus-stack-kube-state-metrics 1/1 1 1 2d3h
deployment.apps/kube-prometheus-stack-operator 1/1 1 1 2d3h
NAME READY AGE
statefulset.apps/prometheus-kube-prometheus-stack-prometheus 1/1 42h