[Nagiosplug-devel] [ nagiosplug-Bugs-756567 ] check_snmp not processing strings

SourceForge.net noreply at sourceforge.net
Wed Jun 18 07:18:10 CEST 2003


Bugs item #756567, was opened at 2003-06-18 12:31
Message generated for change (Comment added) made by amissana
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=756567&group_id=29880

Category: Argument proccessing
Group: v1.3.0 beta3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Missana (amissana)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_snmp not processing strings

Initial Comment:
When I upgraded the software to Nagios 1.1 from 
Netsaint 7, the check_snmp plugin stopped working for 
any strings.
I have included the output below from one of the string 
checks.

[nagios at w2linux libexec]$ ./check_snmp -H w3linux -o 
system.sysName.0 -C public
SNMP OK - w3linux
[nagios at w2linux libexec]$ ./check_snmp -H w3linux -o 
system.sysName.0 -C public -s w3linux
SNMP CRITICAL - *w3linux*

As can be seen without the -s option the plugin come 
back with an ok status,  when I add the -s it always 
comes back critical even though is is an exact match.  
Enclosing string variable in single and double quotes 
yields the same invalid output.

Plugins are from the 1.3.0 build.  

----------------------------------------------------------------------

>Comment By: Tony Missana (amissana)
Date: 2003-06-18 14:17

Message:
Logged In: YES 
user_id=31338

Found a workaround for the problem, added the -OQ 
parameter to the end of the command line which removes the 
type designation i.e STRING: from the return.  Program is now 
processing string  correctley.  Output below.

/* create the command line to execute */
	asprintf (&command_line, "%s -m %s -v %s %s %
s:%s %s -OQ",
	          PATH_TO_SNMPGET, miblist, proto, authpriv, 
server_address, port, oid);
	if (verbose)
		printf ("%s\n", command_line);

Correct output:
[nagios at w2linux plugins]$ ./check_snmp -H w3linux -C public -
o system.sysName.0 -s w3linux
SNMP OK - w3linux

Put invalid string and it compared correctly.

[nagios at w2linux plugins]$ ./check_snmp -H w3linux -C public -
o system.sysName.0 -s w1linux
SNMP CRITICAL - *w3linux*


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=756567&group_id=29880




More information about the Devel mailing list