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
90 stars 84 forks source link

2 changes: flushed userdata scripts. changed constants to env vars #40

Open mpechner-akasa opened 1 year ago

mpechner-akasa commented 1 year ago

https://github.com/aws-samples/amazon-cloudwatch-auto-alarms/pull/39

Description of changes: src/cw_auto_alarms.py Took the following constants: default_period = '5m' default_evaluation_periods = '1' default_statistic = 'Average' Added unique env vars for each: ec2, lambda and rds For instance in my shop, unless RDS CPU is 100% for over 90 minutes, do not care.

Flushed out and used /etc/os-release to make calls OS dependent instead of having to comment or not comment. even if this is meant as an example to put in your own userdata, makes life easier when checking out this tool. userdata_linux_advanced.sh userdata_linux_basic.sh userdata_linux_standard.sh