The one Nagios Plugin framework, forged in the fires of Mount Doom.
gem install nagiosplugin
Just subclass from NagiosPlugin::Plugin and define your check method
which should figure out the status and then call the appropriate status
method (ok, warning, critical or unknown) with meaningfull message.
(The status methods will exit immediately by raising a corresponding StatusError.)
Take a look at a working usage example.
Call the run method on your new class, which outputs the check result
and exits in compliance with the official Nagios plug-in development
guidelines
Profit... and maybe also fun.
- Fork the project and run
bundle installto resolve all development dependencies. - Add specs and/or features for it. This is important so I don't break it in a future version unintentionally.
- Make your feature addition or bug fix.
- Commit, do not mess with the Rakefile or gemspec. (If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull.)
- Send me a pull request. Bonus points for topic branches.
Thanks to the following contributors for improving NagiosPlugin:
- szuecs (Sandor Szücs): Adding default options, perfdata stuff and helpful sample code.
Copyright (c) 2011-2012 Björn Albers. See LICENSE for details.