3

I have a EC2 Ubuntu server instance with a 15GB volume, running a web service. The web service is logging to date-formatted files which are pruned after 7 days. The load on the server is still low, but I'd like to set an alarm if I'm coming close to filling the volume - is it possible to do that? In Monitoring I see no option to add alarm based on capacity percentage...

Many thanks.

Katya S
  • 133
  • 4
  • possible duplicate of [What tool do you use to monitor your servers?](http://serverfault.com/questions/44/what-tool-do-you-use-to-monitor-your-servers) – EEAA May 06 '14 at 15:44
  • 5
    AWS gives you a block device of a certain size. They have no visibility into how much of that block device is in use. As such, you need to use a proper in-system monitoring tool. – EEAA May 06 '14 at 15:45
  • Seems unfortunate.... You can monitor pretty much everything else! Thank you. – Katya S May 06 '14 at 15:46
  • They can notify you of overall system-level usage, CPU usage, disk IO, etc., but they cannot check on status of processes running **within** your vm. For that, you need your own monitoring (which you should have anyway). – EEAA May 06 '14 at 15:54

2 Answers2

9

The EC2 monitoring documentation suggests a method of doing this by installing the Monitoring Scripts for Amazon EC2 Instances and then configuring a cron job to gather the data and reprt back.

user9517
  • 114,104
  • 20
  • 206
  • 289
4

The simple answer to this is no. Much like RAM usage (which you will also see no mention of in CloudWatch metrics), disk space cannot be measured outside of the EC2 instance, and requires an OS-level "agent" to report back.

The issue with agents is privacy (a third party is able to log into your instance), so Amazon has a policy of not breaching this privacy, as doing so would violate a fair number of security certifications, and require Amazon themselves to document, publish and audit the metrics-collection process.

The list of OS-level agents that can monitor disk space is absolutely huge, but if you look into Nagios, StackDriver, Munin, NewRelic you'll soon find a solution that works for you.

Craig Watson
  • 9,370
  • 3
  • 30
  • 46