[Nagiosplug-help] Helprequest about Plugin Return Codes

Anthony Montibello amontibello at gmail.com
Tue Jun 28 02:58:07 CEST 2005


as per the Nagios Plugin Development Guide:
http://nagiosplug.sourceforge.net/developer-guidelines.html

Plugins should return
0 for OK
1 for Warning
2 for Critical
3 for unknown/execution error


Good Luck
TOny


On 6/28/05, Hendrik Baecker <b00mer at gmx.net> wrote:
> Hi List,

at the moment I am writing on some tools for detecting an offline
> nagios
server when runnung two Nagios Server in redundance.

My plan is to
> write a little tool that executes a check_nrpe to connect
from the backup to
> the master to execute there a check_nagios.

My tool works so far that I can
> see the Pluginoutput and the exit code.
But I am wondering that the exitcode
> for a WARNING is 256 and for
CRITICAL 512.

As far as I remember the return
> codes for Plugins should be between 0
and 3, isn't it so?

I am
> using:

./check_nagios -V
check_nagios (nagios-plugins 1.4) 1.25

The only
> hint I was able to find is the enum in the common.h.
I am not a programer,
> but if I understand the syntax of enum right it
should define exit codes
> integer from 0 +1...

Can someone tell me more about this?

Best
> regards
Hendrik

>




More information about the Help mailing list