bizarre problem with solaris plug-ins and exit code

aloclarit at aol.com aloclarit at aol.com
Mon Jun 13 23:18:47 CEST 2005


Guys

I have nagios 2.0 monitoring a bunch of linux boxes just fine.
Recently I was asked to add a few solaris boxes as well - np or so I 
thought....

I installed the plugins for solaris ans set everything up. I use ssh 
with key auth to execute
commands remotely. After setting up the key stuff I ran some plugins 
manually from the nagios
box and everything worked fine.
HERE is the funky part.
I added this new box to the nagios setup and now I observe the 
following :

All the service checks randomly change states between UNKNOWN and OK. I 
cannot see any logic behind that.
Thing is that the actual Status Info says OK for all of the services 
(which is true cause they ARE OK).
I figured there must be a problem with the exitcodes not being returned 
correctly so I modified one plugin to
actually print the exitcode out. When I run this plugin manually it 
ALWAYS returns a 0 yet nagios seems to receive
and UNKNOWN except every now and then it changes to OK only to change 
back later.
Next I wrote a tiny script that ends with this line (exit 0). In other 
words it should always return a 0.
Funny thing is that even then nagios still seems to receive a -1 for 
some reason I can't figure out.
So my questions are:

1. Why does it randomly chagne states ?
2. How can nagios possibly receive a -1 when running the plugin 
manually always returns a 0 ?
3. How can I check what actual exit code nagios receives ?

Anyone (i know this one is waaay bizarre !!)

thx


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list