check_snmp syntax

Subhendu Ghosh sghosh at sghosh.org
Tue Oct 28 16:11:36 CET 2003


On Tue, 28 Oct 2003, Burton, Steven wrote:

> Hi,
> 
> I'm having trouble (I i.e. totally failing) in checking available swap space
> on a remote server.
> 
> I tried check check_snmp (nagios_plugins 1.3.1) 1.24.2.2 and (nagios_plugins
> 1.3.0) 1.24 .
> 
> My results:
> 
> # snmpget -v 1 -c public sclcache1 .1.3.6.1.2.1.25.2.3.1.6.2
> HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 512
> #  ./check_snmp -w 1:100000 -P 1 -H sclcache1 -o .1.3.6.1.2.1.25.2.3.1.6.2 ;
> echo $?
> SNMP WARNING - 512
> 1
> #  ./check_snmp -w 1000:100000 -P 1 -H sclcache1 -o
> .1.3.6.1.2.1.25.2.3.1.6.2 ; echo $?
> SNMP WARNING - *512*
> 1


It looks like snmpget is returning something on stderr (may be a MIB 
parsing problem, specially if you are loading a lot of mibs).  Any output 
on stdderr automatically bumps the output to WARNING - and adds the "*"

Since you are using oids, you might want to try adding the -m "" option to
disable loading of MIBs for both a speedup and removal of mib parsing 
errors.

-sg

> 
> In fact, it always returns 1 unless I use the -c and such parameters as to
> make it critical.
> It seems that OK and WARNING both return 1 but WARNING puts '*' around the
> variable value.
> 
> Am I doing something wrong or is this a known problem?
> 
> If necessary I'll burrow into the source but I *useless* at reading other
> peoples C.
> 
> Steve.

-- 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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