From e3cafe3357318bb5edda989ce770f5e2f582e3b1 Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Mon, 16 Dec 2019 20:15:51 +0100 Subject: [PATCH] Ignore KubeAPILatencyHigh Prometheus alert Closes: #385 --- test/pytest/test_prometheus.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/pytest/test_prometheus.py b/test/pytest/test_prometheus.py index 6fb82913a..f6456fcb3 100755 --- a/test/pytest/test_prometheus.py +++ b/test/pytest/test_prometheus.py @@ -21,19 +21,22 @@ def test_prometheus_alerts(host): ignored_alerts = [] for alert in alerts: - # Filter out the ever firing "Dead mans switch" test alert + # Ignore the ever firing "Dead mans switch" test alert if (alert["labels"]["severity"] == "none" or \ # Filter out failing Nextcloud installation jobs since a lot of # them fail until they succeed during installation (re.match(r'(KubeJobFailed|KubeJobCompletion)', alert["labels"]["alertname"]) and "nextcloud" in alert["labels"]["job_name"]) or - # Filter out failing Nextcloud pods since a lot of pods fail + # Ignore failing Nextcloud pods since a lot of pods fail # during installation # We use python-behave tests to check for functionality (re.match(r'(KubePodNotReady)', alert["labels"]["alertname"]) and - "nextcloud" in alert["labels"]["pod"])): + "nextcloud" in alert["labels"]["pod"]) or + # Ignore `KubeAPILatencyHigh` fom high load during installation + # phase + alert["labels"]["alertname"] == "KubeAPILatencyHigh"): ignored_alerts.append(alert) else: real_alerts.append(alert) -- GitLab