Skip to content

Instantly share code, notes, and snippets.

@demyanovs
Created August 13, 2020 20:57
Show Gist options
  • Save demyanovs/a6d962d496e21552e608576cc28101b4 to your computer and use it in GitHub Desktop.
Save demyanovs/a6d962d496e21552e608576cc28101b4 to your computer and use it in GitHub Desktop.
AWS
#!/bin/bash
yum update -y
sudo yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https perl-Digest-SHA.x86_64
cd /home/ec2-user/
curl https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O
unzip CloudWatchMonitoringScripts-1.2.2.zip
rm -rf CloudWatchMonitoringScripts-1.2.2.zip
# Use the commands below for the lab.
# /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --verify --verbose
# /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail
# */1 * * * * root /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment