experiments with go and nagios 2

Posted by peter on October 25, 2011

I’ve been working on contract at the goog of late, and had the opportunity to play with Go. I ended up liking it a lot more than I expected to, so I decided to rewrite a few small infrastructure pieces/shunts that were bothering me in go.

First is a replacement for ganglia-graphite.rb that runs about 15x faster. Our central gmond machine couldn’t keep up using rexml-based ganglia-graphite.rb, and was burning all its available cpu time spitting out data every 90 seconds or so.

Second piece is a replacement for nagios’ ncsa which accepts check results (with multi-line output and as much perf data as you please) as json or protobuf. There are certainly other replacements out there, but this one is mine. I think it sucks only a little bit. I’m maybe letting this one go too early, as I’ve got plans to extend it to replace NRPE as well (a piece of nagios that also sucks), but I’m using it right now to fill a need to return a large number of passive informative checks from a few single hosts.

Both are up on my github page (the former here and the latter here). They’re a bit rough; I’m both new to the language and a shitty coder, so dragons, etc etc. Let me know if you find them useful, or alternately if you find them worthless.