July Release Confetti
150+ New Courses, Hands‑On Labs, And
Interactive Learning Activities
Learn More

CloudWatch Logs: Agent for EC2

Length: 00:22:47

Lesson Summary:

OS-Level metrics and Logs are not sent to CloudWatch from EC2 by default. These metrics include memory, disk-use percentages, and swap file usage. For you to be able to incorporate these in your logging, the CloudWatch Agent must be installed. This video walks through a CloudWatch Agent install and configuration and shows examples of the logs.

Commands to install CloudWatch Agent:

wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip
unzip AmazonCloudWatchAgent.zip
sudo ./install.sh
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s

Fetching Config From SSM

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c ssm: AmazonCloudWatch-linux -s

SSM Commands Run

AWS-ConfigureAWSPackage and AmazonCloudWatch-ManageAgent


This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More