Last active
April 14, 2018 13:45
-
-
Save Kalki5/7a1af8c1c0c3f28d164bf85f6fcfe66c to your computer and use it in GitHub Desktop.
Install AWS Cloud Watch Agent on Ubuntu. Custom Logs and custom metrics
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents", | |
"logs:DescribeLogStreams" | |
], | |
"Resource": [ | |
"arn:aws:logs:*:*:*" | |
] | |
} | |
] | |
} |
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
sudo apt-get install -y python-pip | |
pip install awscli | |
aws configure | |
curl https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O | |
sudo python ./awslogs-agent-setup.py --region us-east-1 | |
*/5 * * * * ~/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --from-cron |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment