From a0ff9a5d8e6e00f088e3b81a375e5075920089e5 Mon Sep 17 00:00:00 2001 From: Hoan To Date: Tue, 6 Sep 2022 13:14:46 +0200 Subject: [PATCH] added elasticsearch health check rule --- templates/prometheus/config/prometheus/alert.rules.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/prometheus/config/prometheus/alert.rules.j2 b/templates/prometheus/config/prometheus/alert.rules.j2 index 6e2b6cc..18c966a 100644 --- a/templates/prometheus/config/prometheus/alert.rules.j2 +++ b/templates/prometheus/config/prometheus/alert.rules.j2 @@ -340,3 +340,13 @@ groups: annotations: summary: "Too many request against digitalocean API. plz check." description: "Alert for request against digitalocean API." + + - alert: elasticsearch health status not green + expr: avg(elasticsearch_cluster_health_status{color="green"}) < 1 + for: 2m + labels: + severity: critical + annotations: + summary: "Elasticsearch health status is not green. Please Check" + description: "Alert for Elasticsearch health status" +