@@ -17,11 +17,12 @@ resource "aws_cloudwatch_metric_alarm" "cluster_status_is_red" {
1717 metric_name = " ClusterStatus.red"
1818 namespace = " AWS/ES"
1919 period = " 60"
20- statistic = " Average "
20+ statistic = " Maximum "
2121 threshold = " 1"
2222 alarm_description = " Average elasticsearch cluster status is in red over last 5 minutes"
2323 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
2424 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
25+ treat_missing_data = " ignore"
2526
2627 dimensions {
2728 DomainName = " ${ var . domain_name } "
@@ -37,11 +38,12 @@ resource "aws_cloudwatch_metric_alarm" "cluster_status_is_yellow" {
3738 metric_name = " ClusterStatus.yellow"
3839 namespace = " AWS/ES"
3940 period = " 60"
40- statistic = " Average "
41+ statistic = " Maximum "
4142 threshold = " 1"
4243 alarm_description = " Average elasticsearch cluster status is in yellow over last 5 minutes"
4344 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
4445 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
46+ treat_missing_data = " ignore"
4547
4648 dimensions {
4749 DomainName = " ${ var . domain_name } "
@@ -57,11 +59,12 @@ resource "aws_cloudwatch_metric_alarm" "free_storage_space_too_low" {
5759 metric_name = " FreeStorageSpace"
5860 namespace = " AWS/ES"
5961 period = " 60"
60- statistic = " Average "
62+ statistic = " Minimum "
6163 threshold = " ${ local . thresholds [" FreeStorageSpaceThreshold" ]} "
6264 alarm_description = " Average elasticsearch free storage space over last 1 minutes is too low"
6365 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
6466 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
67+ treat_missing_data = " ignore"
6568
6669 dimensions {
6770 DomainName = " ${ var . domain_name } "
@@ -77,11 +80,12 @@ resource "aws_cloudwatch_metric_alarm" "cluster_index_writes_blocked" {
7780 metric_name = " ClusterIndexWritesBlocked"
7881 namespace = " AWS/ES"
7982 period = " 300"
80- statistic = " Average "
83+ statistic = " Maximum "
8184 threshold = " 1"
8285 alarm_description = " Elasticsearch index writes being blocker over last 10 minutes"
8386 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
8487 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
88+ treat_missing_data = " ignore"
8589
8690 dimensions {
8791 DomainName = " ${ var . domain_name } "
@@ -102,6 +106,7 @@ resource "aws_cloudwatch_metric_alarm" "insufficient_available_nodes" {
102106 alarm_description = " Elasticsearch nodes minimum < ${ local . thresholds [" MinimumAvailableNodes" ]} for 1 day"
103107 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
104108 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
109+ treat_missing_data = " ignore"
105110
106111 dimensions {
107112 DomainName = " ${ var . domain_name } "
@@ -122,6 +127,7 @@ resource "aws_cloudwatch_metric_alarm" "automated_snapshot_failure" {
122127 alarm_description = " Elasticsearch automated snapshot failed over last 10 minutes"
123128 alarm_actions = [" ${ local . aws_sns_topic_arn } " ]
124129 ok_actions = [" ${ local . aws_sns_topic_arn } " ]
130+ treat_missing_data = " ignore"
125131
126132 dimensions {
127133 DomainName = " ${ var . domain_name } "
0 commit comments