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

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
  • 116,228
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,670
  • 3
  • 33
  • 47