plugin and a reported wrong state

Jamin jragle at unm.edu
Tue Oct 8 19:06:38 CEST 2002


Thanks Subhendu.  Here is what I got.

Looks like I get a '0'.  

  SNMP OK - up(1) up(1) up(1) up(1)
  [root at mybox libexec]# echo $?
  0

On a down I get a '2'.

  SNMP CRITICAL - up(1) up(1) up(1) *down(2)*
  [root at mybox libexec]# echo $?
  2

It looks like it is working correctly, any ideas now?
-Jamin


On Mon, 7 Oct 2002, Subhendu Ghosh wrote:

> check the return code when running on command line "echo $?"
> 
> most likely you have some MIB parsing issues in your snmp installation.
> 
> -sg
> 
> On Mon, 7 Oct 2002, Jamin wrote:
> 
> > Has anyone had any problems with plugins reporting the wrong state in 
> > nagios? 
> > 
> > I'm using the check_snmp plugin that, when run by hand reports:
> >   "SNMP OK - up(1) up(1) up(1) up(1)"
> > 
> > but when it is run by nagios I get:
> >   "SNMP WARNING - up(1) up(1) up(1) up(1)"
> > 
> > Of course when a device actually goes down I get: (which is fine)
> >   "SNMP CRITICAL - up(1) up(1) up(1) *down(2)*"
> > 
> > 
> > If you could give me a pointer on where I might be going wrong here, I 
> > would appreciate it.
> > 
> > Thanks,
> > -Jamin
> > 
> > 
> > P.S.
> > I am using Nagios ver. 1.0b5 on a standard redhat install.
> > And here is my command:
> > 
> > [root at mybox libexec]# ./check_snmp -H XXX.XXX.XXX.X -t 5 -C notpublic -o
> > .1.3.6.1.2.1.2.2.1.8.1003,.1.3.6.1.2.1.2.2.1.8.4002,.1.3.6.1.2.1.2.2.1.8.4004,.1.3.6.1.2.1.2.2.1.8.4005
> > -D " " -s "up(1)" -s "up(1)" -s "up(1)" -s "up(1)"
> > 
> > SNMP OK - up(1) up(1) up(1) up(1)
> > 
> > 
> > ______________________________________________________________________
> > Tautology -- "A tautology is a thing which is tautological."
> >                                                    -- Unknown
> > ______________________________________________________________________
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > 
> 
> -- 
> 
> 

__________________________________________________________________________
"The Church says that the Earth is flat, but know that it is round, for I
have seen the shadow on the Moon, and I have more faith in a shadow than
in the Church."

-Ferdinand Magellan
--------------------------------------------------------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list