Custom check plug-in


#1

I have created a check plug-in using bash shell…

I don’t know how to process the return_code thus nagios can recognize warning and critical status.


#2

Ok. Eventually i found the answer to this problem.
Just write the exit 0 , 1 or 2 at the end of IF


#3

Or, if you source $NAGIOS-HOME/libexec/utils.sh you can use the following variables as your exit codes:
$STATE_OK
$STATE_WARNING
$STATE_CRITICAL

Reading through other people’s plugins can be really educational :slight_smile:

Oh! Be sure to upload your check script to www.nagiosexchange.org. Other people might appreciate your script as well! :slight_smile: