aws-samples / amazon-cloudwatch-auto-alarms

Automatically create and configure Amazon CloudWatch alarms for EC2 instances, RDS, and AWS Lambda using tags for standard and custom CloudWatch Metrics.
MIT No Attribution
91 stars 85 forks source link

Lambda ERR >> Failure creating alarm: list index out of range #15

Open ahag93 opened 2 years ago

ahag93 commented 2 years ago

I Have this issue with my Windows platform and Basic CWAgent Namespace :

[ERROR] IndexError: list index out of range Traceback (most recent call last): File "/var/task/cw_auto_alarms.py", line 145, in lambda_handler process_alarm_tags(instance_id, instance_info, default_alarms, metric_dimensions_map, sns_topic_arn, File "/var/task/actions.py", line 205, in process_alarm_tags create_alarm_from_tag(instance_id, alarm_tag, instance_info, metric_dimensions_map, sns_topic_arn, alarm_separator) File "/var/task/actions.py", line 165, in create_alarm_from_tag val = additional_dimensions[num * 2 + 1]

???? Thanks !

traveltek-tmalek commented 2 years ago

Hey I am getting a similar issue. Did you ever figure this out?

will62185 commented 2 years ago

Hi @traveltek-tmalek, I'm currently getting the same issue. I've been debugging it, and it seems that I get that error when using a custom namespace other than CWAgent.

Edit: further debugging it seems any custom namespaces containing dashes - cause that error.