Last active
October 20, 2021 14:07
-
-
Save asolera/0c46bad83bd272ea7899bc09ad675aba to your computer and use it in GitHub Desktop.
Installing AWS CloudAgent on Amazon Linux
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
#!/bin/sh | |
# Associate IAM profile (with role `CloudWatchAgentServerRole`) to your EC2 instance | |
# Install CloudWatch | |
sudo yum install amazon-cloudwatch-agent -y | |
# Install CollectD | |
sudo amazon-linux-extras install collectd -y | |
# Configure CloudWatch | |
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard | |
# Start agent | |
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment