Muhammad AbdulMoiz
Software Developer at Sastaticket.pk
Author: Muhammad AbdulMoiz
Author: Muhammad AbdulMoiz
Muhammad AbdulMoiz
Software Developer at Recurship
Author: Muhammad AbdulMoiz
React to resource change
Easy to configure
Set Alarms
Monitor Other AWS Resources
Monitor and store logs
Monitor custom metrics
Monitor Amazon EC2
View graphs and stats
Steps to follow for setup
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html
Creating Roles for user used with cloud watch agent
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent.html
EC2 Allows EC2 instances to call AWS services on your behalf
Include CloudWatchAgentServerPolicy
AmazonEC2RoleforSSM
Attaching role to EC2 instance
Installing cloud watch on ec2 instance (Linux)
https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-startup-linux.html
mkdir config
cd config
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip
unzip AmazonCloudWatchAgent.zip
sudo ./install.sh
Create the CloudWatch Agent Configuration File with the Wizard
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
Create the CloudWatch Agent Configuration File with the Wizard
// for starting agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a start
//For stopping agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a stop
//For checking ssm status
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
// For using ssm agent group
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c
ssm:configuration-parameter-store-name -s
Cloud watch log monitoring and alarms
Any Questions ????
By Muhammad AbdulMoiz
Integration aws cloud watch for logs and instance monitoring