From ab5f35b278d93c65475f183df302bbb0278592eb Mon Sep 17 00:00:00 2001 From: Aman Shah Date: Mon, 18 Nov 2024 16:27:37 +0530 Subject: [PATCH] Fixed the alert query for domains status --- argocd-helm-charts/prometheus-linuxaid/rules/domain.yaml | 2 +- argocd-helm-charts/prometheus-linuxaid/tests/domain.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/argocd-helm-charts/prometheus-linuxaid/rules/domain.yaml b/argocd-helm-charts/prometheus-linuxaid/rules/domain.yaml index 2d46b2af..da330ff4 100644 --- a/argocd-helm-charts/prometheus-linuxaid/rules/domain.yaml +++ b/argocd-helm-charts/prometheus-linuxaid/rules/domain.yaml @@ -3,7 +3,7 @@ groups: rules: - alert: monitor::domains::status expr: | - probe_http_status_code != 0 and probe_http_content_length > 0 + (probe_http_status_code == 0 or probe_http_status_code >= 500) and on(certname) probe_http_content_length <= 0 and on(certname) obmondo_monitoring{alert_id="monitor::domains::status"} > 0 labels: severity: critical diff --git a/argocd-helm-charts/prometheus-linuxaid/tests/domain.yaml b/argocd-helm-charts/prometheus-linuxaid/tests/domain.yaml index 0dadd3b3..66923997 100644 --- a/argocd-helm-charts/prometheus-linuxaid/tests/domain.yaml +++ b/argocd-helm-charts/prometheus-linuxaid/tests/domain.yaml @@ -10,9 +10,9 @@ tests: - series: obmondo_monitoring{certname="dev01.example", alert_id="monitor::domains::status"} values: 1x1000 - series: probe_http_status_code{domain="example.com",certname="dev01.example"} - values: 200x100 + values: 0x100 - series: probe_http_content_length{domain="example.com",certname="dev01.example"} - values: 150x100 + values: 0x100 alert_rule_test: - alertname: monitor::domains::status