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.
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.
Selected answer will no longer work because:
The CloudWatch monitoring scripts are deprecated. We recommend that you use the CloudWatch agent to collect metrics and logs. - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html
I found this guide helpful at setting up custom cloudwatch metric such as disk monitoring: https://marbot.io/blog/monitoring-ec2-disk-usage.html
The only thing that the above is missing is setting up IAM role and attaching it to the EC2, guide for this is here (do this first, then follow the blog post): https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent.html
Per recommendation, summary steps below:
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.
I agree with Christopher Hinkle's agreement with Frederick Cheung's answer :)
Instead of using a utility where you still have to setup all the alerts yourself, try using Blue Matador. It will set up all the alerts for you, on all the mount points, on all the servers.
That said, you should also watch a lot more metrics than just the disk space. There's a guide called How to Monitor Amazon EBS with CloudWatch that goes over all the metrics and how you should approach monitoring them (if you don't use Blue Matador to automate them).