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

Disk Alarms not getting created #30

Closed kzuki13337 closed 1 year ago

kzuki13337 commented 1 year ago

I have deployed the solution and works well for the CPU alarms, however for generating disk alarms & memory alarms its not generating.

When i check the alarms, it shows insufficient data, however when i check in the all metrics section of Cloudwatch the disk_free, disk_used do populate the data.

Went through the documentation again, do I need to add another tag like the one below and reboot the ec2 to generate the alarm Secondly, xvda2 does this need to be changed to actual disk name like nvme0n1p2 AutoAlarm-CW_Metrics-device-xvda2-fstype-xfs-path-/-GreaterThanThreshold-10m-Average-default1

kzuki13337 commented 1 year ago

Redeployed the solution again, but still the same issue. Alarms are getting created but there is insufficient data. However, when i look at the custom namespace created in the cloudwatch CW-Metrics, its shows the metrics collection data.

Kindly advise, what may be the issue.

kzuki1337 commented 1 year ago

Please

Redeployed the solution again, but still the same issue. Alarms are getting created but there is insufficient data. However, when i look at the custom namespace created in the cloudwatch CW-Metrics, its shows the metrics collection data.

Kindly advise, what may be the issue.

This is now closed, i figured out the error that i made...Thanks for the great solution

brokenmasonjars commented 1 year ago

I found an issue when it comes to the prefixes of the alarm, you cannot use a dash "-" at all. It will cause the alarm itself to not work with all the attributes being shifted and never getting out of a insufficient data state.

I would recommend updating the readme.md to include that bit of information to save some troubleshooting time :).

knizami commented 1 year ago

Hi

I found an issue when it comes to the prefixes of the alarm, you cannot use a dash "-" at all. It will cause the alarm itself to not work with all the attributes being shifted and never getting out of a insufficient data state.

I would recommend updating the readme.md to include that bit of information to save some troubleshooting time :).

Hello, you are correct. I believe this is addressed in the documentation here:

"If your dimensions name uses the default separator character '-', then you can update the alarm_separator variable in cw_auto_alarms.py with an alternative seperator character such as '~'."