| 1 |
packages: |
| 2 |
yum: |
| 3 |
perl-DateTime: [] |
| 4 |
perl-Sys-Syslog: [] |
| 5 |
perl-LWP-Protocol-https: [] |
| 6 |
perl-Switch: [] |
| 7 |
perl-URI: [] |
| 8 |
perl-Bundle-LWP: [] |
| 9 |
|
| 10 |
sources: |
| 11 |
/opt/cloudwatch: http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip |
| 12 |
|
| 13 |
container_commands: |
| 14 |
01-setupcron: |
| 15 |
command: | |
| 16 |
echo '*/5 * * * * 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 |
| 17 |
02-changeperm: |
| 18 |
command: chmod 644 /etc/cron.d/cwpump |
| 19 |
03-changeperm: |
| 20 |
command: chmod u+x /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl |
| 21 |
|
| 22 |
option_settings: |
| 23 |
"aws:autoscaling:launchconfiguration" : |
| 24 |
IamInstanceProfile : "aws-elasticbeanstalk-ec2-role" |
| 25 |
"aws:elasticbeanstalk:customoption" : |
| 26 |
CloudWatchMetrics : "--mem-util --mem-used --mem-avail --disk-space-util --disk-space-used --disk-space-avail --disk-path=/ --auto-scaling" |