Advertisement

Install Cloudwatch Agent on Ec2 Linux Instance to get the Memory metrics on Cloudwatch

Install Cloudwatch Agent on Ec2 Linux Instance to get the Memory metrics on Cloudwatch aws config,aws cloudwatch,aws cloudwatch insights,aws cli cloudwatch,aws cloudwatch custom metrics,aws cloudwatch agent,cloudwatch agent,cloudwatch custom metrics,install cloudwatch agent,cloudwatch agent install on linux

Install cloudwatch agent on Ec2 instance for
memory metrics,logs and place it in dashboard...
Login with Root User
1.Launch Ec2 intance with iam role
(cloudwatchagentadminservice)
2.Give Default SG,http and Ssh protocols to the instance.

Installing the Cloudwatch Agent on Linux instance:
Connect to the Linux instance with Putty.
Find the cloudwatch agent download link here:

Download the Cloudwatch Unified Agent. Find the right agent
link for your OS by visiiting the above link.
1.Open Putty and and enter this to download the cloudwatch agent in linux instance.
wget
2.Install the Cloudwatch Agent
sudo rpm -U ./amazon-cloudwatch-agent.rpm
3.Configure the Cloudwatch agent with the help of a setup wizard:
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
Here select which instance type and what are the metrics you want to get like that.
4.Start the agent
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
Now wait for few minutes to collect the data.Goto the Cloudwatch section-Metrics-You will see cwagent


Part 2 : View the collected cloudwatch custom metrics
1. Navigate to Cloudwatch Management Console

2. On the left navigation pane select Metrics and you should see a window like this:

3. Click on the CWAgent. This is the metrics sent by the Unified cloudwatch agent.
4. Goto imageid,instanceid,instancetype and select mem_used_percent.

aws config,aws cloudwatch,aws cloudwatch insights,aws cli cloudwatch,aws cloudwatch custom metrics,aws cloudwatch agent,cloudwatch agent,cloudwatch custom metrics,install cloudwatch agent,cloudwatch agent install on linux,aws cloudwatch metrics,

Yorum Gönder

0 Yorumlar