Open In App

Collect Metrics and Logs with the CloudWatch Agent

Amazon CloudWatch is the powerful tool that used to collect metrics on resources and monitor their performance of the resources. It can monitor system-level metrics like CPU usage, memory usage, and disk space and also the application levels metrics like requests per second and error rates. By collecting these data it will help the developers to analyze and know the performance of the servers.

Tasks Performed by Cloudwatch Agent

How does the Cloudwatch Agent Works?

It collects all the metrics and logs from aws resources and applications. With the help of these collected metrics it helps us to visualize the application on cloudwatch dashboard.If we do some operational changes in the environment the cloud watch agent becomes aware of these changes and act accordingly.And finally it provides us real time analysis by using cloud watch metric map.



Setting up Cloud Agent in Our Servers

Step 1: Firstly login to your AWS account and we need to create the roles. Search for IAM role and navigate to it and on left side under Acess managment go to roles and click on create new role and keep the trusted identity as default and in use case select EC2 as shown in the image below.

 

Next, search for these three roles as mentioned below and select them



  1. AmazonEC2RoleforSSM
  2. CloudWatchAgentAdminPolicy
  3. CloudWatchAgentServerPolicy

Step 2:Creating Instance

 

Step 3:Collecting Metrics and Logs

 

Example view of CPU utilization

 

 


Article Tags :