• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

3 Steps to Setup EC2 EBS Volume Disk Space Monitoring using Cloudwatch

The default monitoring of Amazon EC2 does not track the EBS disk space. To monitor disk space in EC2 instance, you need can either manually installed Cloudwatch Agent or can use SSM to install the agent. After installing you

Step 1. Instal cloudwatch agent
sudo yum -y install amazon-cloudwatch-agent

Step 2. create a config.json file  in the following location.

/opt/aws/amazon-cloudwatch-agent/bin/config.json


{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"metrics": {
"append_dimensions": {
"AutoScalingGroupName": "${aws:AutoScalingGroupName}",
"ImageId": "${aws:ImageId}",
"InstanceId": "${aws:InstanceId}",
"InstanceType": "${aws:InstanceType}"
},
"metrics_collected": {
"disk": {
"measurement": [
"used_percent"
],
"metrics_collection_interval": 60,
"resources": [
"*"
]
},
"mem": {
"measurement": [
"mem_used_percent"
],
"metrics_collection_interval": 60
}
}
}
}

 

3. Run the agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json

4. check the status of the agent.

systemctl status amazon-cloudwatch-agent

 

Troubleshooting

If there is an issue starting the agent, you can have a look at  the Cloudwatch logs at var/log/amazon/amazon-cloudwatch-agent

 

 

Related posts:

  1. 32 Effective Home Security Checklist
  2. How to Extend Linux LVM by Adding a New Hard Disk
  3. How to Setup AWS CloudFront for Externally Registered Domain Name
  4. What Elon Musk Needs Doing to Make X.com(Twitter) Great Again?

Primary Sidebar

Please help us sharing

Categories

  • Artificial Intelligence
  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Cyber Insurance
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

antivirus audit AWS backup browser check cisco cloud computer cyber data database ddos email encryption firewall home hsrp ids internet it kubernetes linux load balancing malware network protection putty risk router security security tips server social media ssh SSL tools virus vpn vulnerability web webserver website windows wordpress