diff --git a/test/pytest/test_prometheus.py b/test/pytest/test_prometheus.py index 70aec925381618ee2035f955072782eeee8f20b4..5fca63efa3520fc723745d12cca31e5fcb4db41c 100755 --- a/test/pytest/test_prometheus.py +++ b/test/pytest/test_prometheus.py @@ -11,47 +11,15 @@ def ignore_alert(alert): equals "none", or in some application specific cases. """ + # Ignore watchdog alerts if alert["labels"]["severity"] == "none": return True # Ignore `KubeAPILatencyHigh` fom high load during installation # phase - if alert["labels"]["alertname"] == "KubeAPILatencyHigh": + if alert["labels"]["alertname"] == "KubeAPIDown": return True - if 'pod' in alert["labels"]: - # Filter out failing Nextcloud installation jobs since a lot of - # them fail until they succeed during installation - if "nextcloud" in alert["labels"]["pod"]: - if alert["labels"]["alertname"] in [ - "KubeJobFailed", - "KubeJobCompletion", - "KubePodNotReady"]: - return True - - # Filter out when some apps take too long to start - if re.search("(rocketchat|wordpress)", alert["labels"]["pod"]): - if alert["labels"]["alertname"] in [ - "KubePodNotReady", - "KubeDeploymentReplicasMismatch", - "KubeStatefulSetReplicasMismatch"]: - return True - - # Filter out failed signgle-sign-on pods until we fix - # https://open.greenhost.net/openappstack/single-sign-on/issues/26 - if "single-sign-on-create-" in alert["labels"]["pod"]: - if alert["labels"]["alertname"] in ["KubePodNotReady"]: - return True - - if 'job_name' in alert["labels"]: - # Filter out failed signgle-sign-on jobs until we fix - # https://open.greenhost.net/openappstack/single-sign-on/issues/26 - if "single-sign-on-create-" in alert["labels"]["job_name"]: - if alert["labels"]["alertname"] in [ - "KubeJobFailed", - "KubeJobCompletion"]: - return True - return False