Skip to content
Snippets Groups Projects
Verified Commit e3cafe33 authored by Varac's avatar Varac
Browse files

Ignore KubeAPILatencyHigh Prometheus alert

Closes: #385
parent 5e2b811c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment