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 @@
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