Nagios::Plugin::DieNicely

Die in a Nagios output compatible way
Download

Nagios::Plugin::DieNicely Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Jose Luis Martinez Torres
  • Publisher web site:
  • http://search.cpan.org/~jlmartin/

Nagios::Plugin::DieNicely Tags


Nagios::Plugin::DieNicely Description

Die in a Nagios output compatible way When your Nagios plugins, or the modules that they use raise an unhandled exception with die, croak or confess, the exception gets lost, and Nagios treats the output as an UNKNOWN state with no output from the plugin, as STDERR gets discarded by Nagios.Nagios::Plugin::DieNicely is a Perl module that overrides Perl's default behaviour of using exit code 255 and printing the error to STDERR (not Nagios friendly). Just using for exit code 2 (Nagios CRITICAL), and outputing the error to STDOUT with "CRITICAL - " prepended to the exception. Note that you can change the CRITICAL for WARNING, or even OK (not recommended).SYNOPSIS use Nagios::Plugin::DieNicely; ... your plugin code goes here ... use Nagios::Plugin::DieNicely 'WARNING'; ... now if you die, you will get a Nagios WARNING state ... Requirements: · Perl


Nagios::Plugin::DieNicely Related Software