From: Dmitry Kalashnik Date: Tue, 11 Jul 2017 11:14:08 +0000 (+0400) Subject: Change min to max as far as the largest metric value is the worst X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=commitdiff_plain;h=refs%2Fchanges%2F01%2F7301%2F3 Change min to max as far as the largest metric value is the worst Change-Id: Ib37aeada66519006b7b5a817625bda416b93ac57 --- 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