Created
December 9, 2018 12:50
-
-
Save giovanigenerali/8aa515ef3810a432f8b85ea266f63ed8 to your computer and use it in GitHub Desktop.
aws elastic beanstalk - memory monitor
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
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html | |
# .ebextensions/memory_monitor.config | |
container_commands: | |
00install: | |
command: "sudo yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https perl-Digest-SHA.x86_64" | |
ignoreErrors: false | |
01download: | |
command: "curl https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O" | |
ignoreErrors: true | |
02extract: | |
command: "unzip CloudWatchMonitoringScripts-1.2.2.zip" | |
ignoreErrors: true | |
03rmzip: | |
command: "rm CloudWatchMonitoringScripts-1.2.2.zip" | |
ignoreErrors: true | |
04cdinto: | |
command: "mv aws-scripts-mon/ /home/ec2-user" | |
ignoreErrors: true | |
05cron: | |
command: "crontab -l | grep -q 'mon-put-instance-data.pl' || 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