Mike Conigliaro

Trigger Nagios Alerts from Ganglia Metrics

While ranting in ##infra-talk recently about how I hate basically every monitoring app I’ve ever used, Vladimir Vuksan showed me a PHP script he wrote a while back that could be used by Nagios to trigger alerts on Ganglia metrics. Until then, I had no idea that such a thing was even possible, but I’m glad I found out when I did, because I had just started writing a bunch of custom Nagios check plugins (essentially duplicating a lot of the work I already put into my custom Ganglia modules).

After trying his PHP script and seeing how useful it was (despite its simplicity), I decided to try rewriting it in Python in order to add some of the power and flexibility I felt it was missing. The result of that effort can be found here: check_ganglia_metric.

Vlad recently wrote a blog post about why you should use your trending data for alerting, and I agree with all his points, but he missed the most important reason for me; no duplicated code. I hated the idea of having to write a custom Ganglia module for trending and a separate Nagios check plugin for alerting on the same data. Now I don’t have to, and neither do you! =)

blog comments powered by Disqus