Skip to content

Instantly share code, notes, and snippets.

@thomasmichaelwallace
Last active September 26, 2019 10:56
Show Gist options
  • Save thomasmichaelwallace/113116c7ecad817767dc3136bdf28981 to your computer and use it in GitHub Desktop.
Save thomasmichaelwallace/113116c7ecad817767dc3136bdf28981 to your computer and use it in GitHub Desktop.
EB CloudWatch memory usage reporting .ebextensions file
container_commands:
00download:
command: "wget http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip"
ignoreErrors: true
01extract:
command: "unzip -o CloudWatchMonitoringScripts-1.2.1.zip"
ignoreErrors: true
02rmzip:
command: "rm CloudWatchMonitoringScripts-1.2.1.zip"
ignoreErrors: true
03prereq:
command: "yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https"
ignoreErrors: false
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