Forked from amccarty/gist:efb8b8cfd2a42363cf060ff7778a10f9
Last active
August 18, 2019 17:52
-
-
Save joshes/0a7c05c5b600347575e0422641c9d3bc to your computer and use it in GitHub Desktop.
Elastic Beanstalk memory monitor cron
This file contains 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
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html | |
#.ebextensions/01-memorymon.config | |
packages: | |
yum: | |
perl-Switch: [] | |
perl-DateTime: [] | |
perl-Sys-Syslog: [] | |
perl-LWP-Protocol-https: [] | |
perl-Digest-SHA.x86_64: [] | |
container_commands: | |
00download: | |
command: "wget http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip" | |
ignoreErrors: true | |
01extract: | |
command: "unzip CloudWatchMonitoringScripts-v1.1.0.zip" | |
ignoreErrors: true | |
02rmzip: | |
command: "rm CloudWatchMonitoringScripts-v1.1.0.zip" | |
ignoreErrors: true | |
03cdinto: | |
command: "mv aws-scripts-mon/ /home/ec2-user" | |
ignoreErrors: true | |
04cron: | |
test: test ! -f /var/spool/cron/root | |
command: "crontab -l | { cat; echo '* * * * * /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail'; } | crontab -" | |
ignoreErrors: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment