From c266f5d01a52f79bc0d6ced23957e718a3d7b996 Mon Sep 17 00:00:00 2001 From: QuentinBisson Date: Tue, 19 Sep 2023 13:30:41 +0200 Subject: [PATCH] Add outside_working_hours_inhibition back to agent shard alert Signed-off-by: QuentinBisson --- .../templates/alerting-rules/prometheus-agent.rules.yml | 1 + test/tests/providers/global/prometheus-agent.rules.test.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/helm/prometheus-rules/templates/alerting-rules/prometheus-agent.rules.yml b/helm/prometheus-rules/templates/alerting-rules/prometheus-agent.rules.yml index 97bf1b956..042e2175a 100644 --- a/helm/prometheus-rules/templates/alerting-rules/prometheus-agent.rules.yml +++ b/helm/prometheus-rules/templates/alerting-rules/prometheus-agent.rules.yml @@ -73,4 +73,5 @@ spec: cancel_if_cluster_is_not_running_prometheus_agent: "true" cancel_if_cluster_status_creating: "true" cancel_if_cluster_status_deleting: "true" + cancel_if_outside_working_hours: "true" {{- end }} diff --git a/test/tests/providers/global/prometheus-agent.rules.test.yml b/test/tests/providers/global/prometheus-agent.rules.test.yml index d7c43a895..7ed7ff3a0 100644 --- a/test/tests/providers/global/prometheus-agent.rules.test.yml +++ b/test/tests/providers/global/prometheus-agent.rules.test.yml @@ -78,6 +78,7 @@ tests: cancel_if_cluster_is_not_running_prometheus_agent: "true" cancel_if_cluster_status_creating: "true" cancel_if_cluster_status_deleting: "true" + cancel_if_outside_working_hours: "true" exp_annotations: description: "Prometheus agent is missing shards." opsrecipe: "prometheus-agent-missing-shards/" @@ -94,6 +95,7 @@ tests: cancel_if_cluster_is_not_running_prometheus_agent: "true" cancel_if_cluster_status_creating: "true" cancel_if_cluster_status_deleting: "true" + cancel_if_outside_working_hours: "true" exp_annotations: description: "Prometheus agent is missing shards." opsrecipe: "prometheus-agent-missing-shards/"