diff --git a/test/pytest/test_prometheus.py b/test/pytest/test_prometheus.py index f64fc4e2bf3e3950379c087ab4ad34c88d0cf205..4ae44b824863e991d1ecc58e8a4a537cff7ef3a7 100755 --- a/test/pytest/test_prometheus.py +++ b/test/pytest/test_prometheus.py @@ -2,12 +2,12 @@ Test that alertmanager fires no alerts, except for a few ignored by `ignore_alert`. """ -import re import json import os -import requests +import re import pytest +import requests def ignore_alert(alert): @@ -20,10 +20,12 @@ def ignore_alert(alert): if alert["labels"]["severity"] == "none": return True - # Ignore `KubeAPILatencyHigh` fom high load during installation - # phase + # Ignore issues fom high load during installation phase if re.search(r"(KubeAPIDown|KubeletDown|NodeFilesystemSpaceFillingUp)", - alert["labels"]["alertname"]): + alert["labels"]["alertname"]): + return True + # Ignore nextcloud cron jobs (https://open.greenhost.net/openappstack/openappstack/-/issues/984) + if re.search(r"nc-nextcloud-cron", alert["annotations"]["description"]): return True return False