From 85c27aa47cd904d8b487a169d0e56b4c268b9259 Mon Sep 17 00:00:00 2001 From: Dmitry Kalashnik Date: Tue, 11 Jul 2017 15:14:08 +0400 Subject: [PATCH] Change min to max as far as the largest metric value is the worst Change-Id: Ib37aeada66519006b7b5a817625bda416b93ac57 --- elasticsearch/meta/prometheus.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/elasticsearch/meta/prometheus.yml b/elasticsearch/meta/prometheus.yml index e2885b4..464111d 100644 --- a/elasticsearch/meta/prometheus.yml +++ b/elasticsearch/meta/prometheus.yml @@ -2,9 +2,18 @@ {% raw %} server: alert: + ElasticsearchDown: + if: >- + elasticsearch_up != 1 + labels: + severity: warning + service: elasticsearch + annotations: + summary: 'Elasticsearch service down' + description: 'Elasticsearch service is down on node {{ $labels.host }}' ElasticsearchClusterHealthStatusYellow: if: >- - min_over_time(elasticsearch_cluster_health_status[5m]) == 2 + max_over_time(elasticsearch_cluster_health_status[5m]) == 2 labels: severity: warning service: elasticsearch @@ -14,7 +23,7 @@ server: The Elasticsearch cluster status is YELLOW for the last 5 minutes. ElasticsearchClusterHealthStatusRed: if: >- - min_over_time(elasticsearch_cluster_health_status[5m]) == 3 + max_over_time(elasticsearch_cluster_health_status[5m]) == 3 labels: severity: critical service: elasticsearch -- 2.32.7