|We don't bite newbies here... much
Pure Perl Big Brother and Nagios clients: ideas? code bits?by dwm042 (Priest)
|on Apr 24, 2012 at 16:38 UTC
dwm042 has asked for the wisdom of the Perl Monks concerning the following question:
A really sharp architect named Jeremy Bumpus once showed me that it was straightforward to write a script that could speak with a Big Brother server, and thus do tests independent of the BB client. The advantage, of course, is that you don't have to jump through hoops to get the bb user to run tests that only a privileged user should. The code uses IO::Socket, which has been a part of every Perl I've tested, even stripped down system Perls.A bit of test code (half pseudocode) might look something like this:
The cool thing about this test is that it can be run on servers that don't have a compiler (the ordinary BB client install requires cc and make), leading to the notion that the whole bb-local client piece could be replaced with a pure Perl solution on servers for which, for business reasons, you can't install a compiler and for which you have no dev or QA systems to compile from.
And since I've written some tests of this kind for Big Brother, it's making me wonder how much of this technology is transferrable to Nagios. Yes, things aren't entirely thought out or thought through, and I'm fishing for ideas here, particularly from the Perl enabled folks who might understand Nagios client to server protocols.All I'm trying to do is push some useful tests across a broad heterogenous enterprise, where the monitoring solution in place can go from Big Brother to Big Sister to free Nagios to commercial Nagios to Icinga to Zenoss. Some Perl tools for Joe Admin would be appreciated.