Commit c19a9ffc authored by Maarten de Waard's avatar Maarten de Waard
Browse files

Merge branch '385-ignore-some-prometheus-alerts-in-ci' into 'master'

Resolve "Ignore KubeAPILatencyHigh Prometheus alert"

Closes #385

See merge request openappstack/openappstack!185
parents b4f168be e3cafe33
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment