0
votes

I installed CloudWatch Agent on my EC2 instance (Amazon Linux OS version 1) to collect some metrics in the past. Now I am done with my metrics analysis and want to uninstall cloudwatch agent, to save the cost.

I followed the steps from https://docs.amazonaws.cn/en_us/systems-manager/latest/userguide/monitoring-cloudwatch-agent.html page, but my EC2 instance does not show up, as its not a managed instance. So this is not helping.

I can stop the agent using sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a stop command, But on instance reboot, agent would start again.

I dont see any document to uninstall this agent using command line. Removing metrics can be done, but I still want to uninstall this agent. Any suggestions ?

1

1 Answers

1
votes

Answer (not the accepted one) on this page helped me.

Basically I had installed cloudwatch-agent using yum. So i could remove it completely by using following command.

sudo yum remove amazon-cloudwatch-agent -y