Tuesday, January 15, 2013

AWS, ColudWatch and monitoring of available diskspace

We have experienced some disk space related hick-ups in our AWS production environment over the last 3 months.

Some of them were caused by IIS logging (enabled by default when setting up a new website) and others originated from custom trace-logging being left turned on by mistake.

To prevent this from ever happening again we wanted to setup an automatic monitoring and notification mechanism that sent us an email if  the available disk space should drop below a certain threshold on any of the app- or db-servers.

Easy enough...just setup 2 alarms in the AWS CloudWatch and have another cup of coffee I thought.
Doh!
CloudWatch does not have any metrics on the available disk space...

....but they have an API that allows us to create custom metrics and push data into CloudWatch.

Before firing up Visual Studio I decided to skim Google Bing for what's already out there (we don't want to re-invent the wheel...or rather the guys/customer paying our bills don't...). I can hardly be the first one facing this problem right?

Right!
Here's a great open source project that perfectly fit our needs:
https://github.com/eleven41/CloudWatchMonitor
(or if you prefer the binaries: http://www.eleven41.com/Labs/cloudwatch-monitor-for-windows)

The monitor app runs either as a command-line program (nifty to start with to make sure you get the .config settings right) or as a Windows service.

Kudos to Eleven41 for a great solution (and for opensourcing the code) !





No comments:

Post a Comment