From 928ef62122439e490c07abfe2dcff8cc514bd2c6 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 21 Apr 2023 08:18:39 +0200 Subject: [PATCH] =?UTF-8?q?fix=20alerts=20=F0=9F=A4=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prometheus/config-map.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus/config-map.yaml b/prometheus/config-map.yaml index 0ff221f..dd80dbb 100644 --- a/prometheus/config-map.yaml +++ b/prometheus/config-map.yaml @@ -47,12 +47,12 @@ data: - name: KubernetesUnhealthyPod rules: - alert: KubernetesUnhealthyPod - expr: kube_pod_container_status_waiting_reason = 1 + expr: kube_pod_container_status_waiting_reason == 1 for: 5m labels: severity: warning annotations: - summary: "The Pod {{ $labels.pod }} is {{ $labels.reason }}"" + summary: "The Pod {{ $labels.pod }} is {{ $labels.reason }}" description: "The Pod {{ $labels.pod }} is in the state {{ $labels.reason }} for more than 5m. The Pod is in namespace {{ $labels.namespace }} and on node {{ $labels.node }}." - name: PrometheusTargetMissing rules: @@ -63,7 +63,7 @@ data: severity: critical annotations: summary: Prometheus target missing (instance {{ $labels.instance }}) - description: "A Prometheus target has disappeared. {{if ne $labels.job ""}}\n Job: {{ $labels.job }}{{end}}{{if ne $labels.app ""}}\n App: {{ $labels.app }}{{end}}{{if ne $labels.pod ""}}\n Pod: {{ $labels.pod }}{{end}}{{if ne $labels.node ""}}\n Node: {{ $labels.node }}{{end}}{{if ne $labels.namespace ""}}\n Namespace: {{ $labels.namespace }}{{end}}" + description: 'A Prometheus target has disappeared. {{if ne $labels.job ""}}\n Job: {{ $labels.job }}{{end}}{{if ne $labels.app ""}}\n App: {{ $labels.app }}{{end}}{{if ne $labels.pod ""}}\n Pod: {{ $labels.pod }}{{end}}{{if ne $labels.node ""}}\n Node: {{ $labels.node }}{{end}}{{if ne $labels.namespace ""}}\n Namespace: {{ $labels.namespace }}{{end}}' - name: PrometheusConfigurationReloadFailure rules: - alert: PrometheusConfigurationReloadFailure