check_snmp WARNING

Jan Scholten Jan.Scholten at iconz.net
Wed Nov 17 05:34:11 CET 2004


I don't get your problem:
chewbacca:/usr/local/nagios/libexec# ./check_snmp -C public -H myhost -o 
SNMPv2-MIB::sysLocation.0
SNMP OK - Level2, Serverroom 4
chewbacca:/usr/local/nagios/libexec# echo $?
0

What for do you need a -w for that? -w is probably usefull if the return 
Value is a Integer not a String.


create a check_command
like
define command{
command_name	check_syslocation
command_line	$USER1$/check_snmp -C public -H $HOSTADDRESS$ -o 
SNMPv2-MIB::sysLocation.0
}
edit services.cfg for
{
..
..
check_command	check_syslocation
}


And everything should be fine, but checking syslocation is quite 
strange, since switches normally don't wander around.. better place 
would be notes_url i think..


Jan
> I am looking for acceptable warning parameters ( -w ) to resolve the
> following error:
> 
> - check_snmp: invalid warning threshold.
> 
> /check_snmp -C public -H x.x.x.x -o SNMPv2-MIB::syslocation.0 returns SNMP
> OK, 
> -snmpget -c public x.x.x.x -o ....  Also runs ok
> -snmpwalk is ok; but nagios still complains about missing -w option.
> 
> # Solution 2 from the FAQ  below does not resolve the issue because snmpget
> is ok.
> # I plan to download the mibs and try numeric oids,..
>    -but am also interested in any examples of setting -w thresholds without
> (independent of) 
>     numeric oids / useful mibs).  
> 
> I read the FAQ and believe that solution (2) is incorrect. At least for me.
> ; / 
> 
> Solutions:
> 
> 1. Prevent check_snmp from loading the MIBs (default behaviour) by using
> numeric oids AND using the "-m :" option
> 
> or
> 
> 2. run the snmpget command on the command line, check which MIB files is the
> problem, and correct it. 


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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