Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudwatch alarms insufficient data #56

Closed
chelomontilla opened this issue Jan 15, 2020 · 5 comments · Fixed by #77
Closed

Cloudwatch alarms insufficient data #56

chelomontilla opened this issue Jan 15, 2020 · 5 comments · Fixed by #77

Comments

@chelomontilla
Copy link

I've created a redis without enabling the automatic_failover, only one node. The problem is that alarms at cloudwatch shows insufficient data.
The configured dimension value for CacheClusterId in the alarm is "myredis" and if I see in cloudwatch the current metrics having data are in dimension value "myredis-001".

@chelomontilla chelomontilla changed the title Cloudwatch alarm insufficient data Cloudwatch alarms insufficient data Jan 15, 2020
@mukill
Copy link

mukill commented May 1, 2020

were you able to resolve this?

@chelomontilla
Copy link
Author

No, still not

@varunpalekar
Copy link
Contributor

+1

@chrischildresssg
Copy link

chrischildresssg commented Jun 30, 2020

The module itself doesn't include necessary code to handle insufficient data. Both of the "aws_cloudwatch_metric_alarm" resources need to have the "treat_missing_data" argument presented, but do not.

For instance, the "cache_memory" alarm should look like this, with the "treat_missing_data" argument near the bottom:

resource "aws_cloudwatch_metric_alarm" "cache_memory" {
count = var.enabled ? 1 : 0
alarm_name = "${module.label.id}-freeable-memory"
alarm_description = "Redis cluster freeable memory"
comparison_operator = "LessThanThreshold"
evaluation_periods = "1"
metric_name = "FreeableMemory"
namespace = "AWS/ElastiCache"
period = "60"
statistic = "Average"

threshold = var.alarm_memory_threshold_bytes

dimensions = {
CacheClusterId = module.label.id
}

alarm_actions = var.alarm_actions
ok_actions = var.ok_actions

treat_missing_data = var.treat_missing_data

depends_on = [aws_elasticache_replication_group.default]
}

@varunpalekar
Copy link
Contributor

I found the main problem, it's due to creating more than one node in cluster mode, and for single also we need to add node number.
So may be a count with alarm and counting mechanism with module.label.id would solve the problem

dimensions = {
    CacheClusterId = module.label.id
}

I will also create an MR for this.

varunpalekar added a commit to varunpalekar/terraform-aws-elasticache-redis that referenced this issue Aug 14, 2020
varunpalekar added a commit to varunpalekar/terraform-aws-elasticache-redis that referenced this issue Aug 17, 2020
varunpalekar added a commit to varunpalekar/terraform-aws-elasticache-redis that referenced this issue Aug 19, 2020
…ply (cloudposse#56)

The "count" value depends on resource attributes that cannot be
determined until apply. So precalculate.
brian-weis-msr pushed a commit to Measurabl/terraform-aws-elasticache-redis that referenced this issue Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants