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

Prometheus: Ignore failed SSO jobs (see single-sign-on#26)

parent a9cefde9
No related branches found
No related tags found
No related merge requests found
......@@ -49,12 +49,15 @@ def ignore_alert(alert):
Returns true if an alert should be ignored. This is when the "severity"
equals "none", or in some application specific cases.
"""
if alert["labels"]["severity"] == "none":
return True
# Ignore `KubeAPILatencyHigh` fom high load during installation
# phase
if alert["labels"]["alertname"] == "KubeAPILatencyHigh":
return True
# Filter out failing Nextcloud installation jobs since a lot of
# them fail until they succeed during installation
if "nextcloud" in alert["labels"]["pod"]:
......@@ -63,6 +66,7 @@ def ignore_alert(alert):
"KubeJobCompletion",
"KubePodNotReady"]:
return True
# Filter out when RocketChat pods take very long to start
if "rocketchat" in alert["labels"]["pod"]:
if alert["labels"]["alertname"] in [
......@@ -70,6 +74,16 @@ def ignore_alert(alert):
"KubeDeploymentReplicasMismatch",
"KubeStatefulSetReplicasMismatch"]:
return True
# Filter out signgle-sign-on job pods until
# https://open.greenhost.net/openappstack/single-sign-on/issues/26 is fixed
if "single-sign-on-create-" in alert["labels"]["pod"]:
if alert["labels"]["alertname"] in ["KubePodNotReady"]:
return True
if "single-sign-on-create-" in alert["labels"]["job_name"]:
if alert["labels"]["alertname"] in ["KubeJobFailed"]:
return True
return False
......
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