Last active
August 29, 2015 14:27
-
-
Save goonoo/f1133dc88b5d90943f64 to your computer and use it in GitHub Desktop.
Elastic Beanstalk Memory Monitor Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: | |
yum: | |
perl-DateTime: [] | |
perl-Sys-Syslog: [] | |
perl-LWP-Protocol-https: [] | |
perl-core: [] | |
perl-Switch: [] | |
perl-URI: [] | |
perl-Bundle-LWP: [] | |
sources: | |
/opt/cloudwatch: http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip | |
container_commands: | |
01-setupcron: | |
command: | | |
echo '* * * * * root perl /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl `{"Fn::GetOptionSetting" : { "OptionName" : "CloudWatchMetrics", "DefaultValue" : "--mem-util --disk-space-util --disk-path=/" }}` >> /var/log/cwpump.log 2>&1' > /etc/cron.d/cwpump | |
02-changeperm: | |
command: chmod 644 /etc/cron.d/cwpump | |
03-changeperm: | |
command: chmod u+x /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl | |
option_settings: | |
"aws:autoscaling:launchconfiguration" : | |
IamInstanceProfile : "aws-elasticbeanstalk-ec2-role" | |
"aws:elasticbeanstalk:customoption" : | |
CloudWatchMetrics : "--mem-util --mem-used --mem-avail --disk-space-util --disk-space-used --disk-space-avail --disk-path=/ --auto-scaling" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://aws.amazon.com/code/8720044071969977
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html