mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-28 13:14:56 +08:00
Filter out non-running pods in Prometheus
Prometheus job generated by the PodMonitor does not exclude non-running pods. All the "completed" Pods are still going to be listed as targets in Prometheus and marked as down. This issue is related to PodMonitor implementation and is discussed in prometheus-operator/prometheus-operator#4816 Signed-off-by: Arcadie Condrat <arcadie.condrat@gmail.com>
This commit is contained in:
@ -23,3 +23,8 @@ spec:
|
|||||||
- image-reflector-controller
|
- image-reflector-controller
|
||||||
podMetricsEndpoints:
|
podMetricsEndpoints:
|
||||||
- port: http-prom
|
- port: http-prom
|
||||||
|
relabelings:
|
||||||
|
# https://github.com/prometheus-operator/prometheus-operator/issues/4816
|
||||||
|
- sourceLabels: [__meta_kubernetes_pod_phase]
|
||||||
|
action: keep
|
||||||
|
regex: Running
|
||||||
|
|||||||
Reference in New Issue
Block a user