[Nagios-users] Question on setting up my own check

steve f a31modela at hotmail.com
Tue Oct 19 21:08:03 UTC 2010


Spent some more time with it & now getting a little closer

I added this to my script on the dist server running the check:

CLOCK=`date +%s`
HOST=$1
SVC="Starlite Size"
STATUS=$3
OUTPUT=$4

Changed the following lines
exit 0          to    STATUS=0
exit 1          to    STATUS=1
exit 2          to    STATUS=2
exit 3          to     STATUS=3

the line(s) 
echo "OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk '{print $5}'`B, $percent%"
to
OUTPUT="OK. Free Space: `sudo rsh $1 df -v |grep starlite6 |head -1 | awk '{print $5}'`B, $percent%"

running the script manually gives me :

[1287522364] PROCESS_SERVICE_CHECK_RESULT;strXXXX;Starlite Size;2;Critical. Free Space: 51050B, 2%

Up on the central server, I am still getting unknown but a value of null

Closer I think but still not there.

Does the central server have to have the exact same check script on it or in a passive check, does the central server only care about the results?

Thanks,
Steve
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nagios.com/pipermail/nagios-users/attachments/20101019/dbc7302e/attachment.html>


More information about the Nagios-users mailing list