Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I be alerted when an EBS instance is running out of space?

I'm running a wordpress off of AWS, and I can't figure out how to monitor if the volume is running out of capacity. There are many options for monitoring other things, but I just want to know when we run low on space.

like image 731
diogeneshamilton Avatar asked Aug 07 '12 07:08

diogeneshamilton


People also ask

Can CloudWatch monitor EBS disk size utilization?

Enable Available CloudWatch Metrics More information about the installation on Amazon Linux and Red Hat Enterprise Linux. Inside the package, we'll be interested onto mon-put-instance-data.pl script. It will collect memory, swap and disk space utilisation data on the current system and then send it to CloudWatch.

What can you use to monitor the disk capacity utilization for your Amazon EBS volumes?

Monitoring EBS storage with Amazon CloudWatch is a useful mechanism to ensure your application's performance.

Can CloudWatch monitor disk space?

By default, CloudWatch does not provide memory and disk usage metrics for your EC2 Instances. This is because EC2 instances are VMs and CloudWatch only has metrics from the hypervisor, which cannot see the memory and disk usage metrics inside a running VM.


2 Answers

There are no built in metrics for disk space - Because Amazon is looking at this 'from the outside', they don't know what you've done with an EBS volume: it could be part of a raid set, formatted in some exotic format etc.

Amazon has a system called CloudWatch that can be used to monitor AWS systems and resources. Luckily, CloudWatch supports custom metrics: you can use the CloudWatch APIs to add any data you want (and then create alerts off them).

Amazon provides some sample scripts that will publish (among other things) disk space utilisation to Cloudwatch. Do be aware that there is a small charge associated with using custom metrics - $0.50 per metric per month.

like image 64
Frederick Cheung Avatar answered Oct 10 '22 05:10

Frederick Cheung


I agree with Frederick Cheung's answer; however, I found this utility for Windows instances: http://www.eleven41.com/labs/cloudwatch-monitor-for-windows/. It runs as a service and will send the disk space and memory usage metrics to CloudWatch for you. From there, you'd just need to set up the alarm in CloudWatch.

like image 28
Christopher Hinkle Avatar answered Oct 10 '22 05:10

Christopher Hinkle