snmpget allows to qury for oid."string" and check_snmp causes the error Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] xxx.xxx.xxx.xxx:161 NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."string" it's really trivial patch and would be nice if it is fixed in next stable version here's the simple patch --- nagios-plugins-1.4.11/plugins/popen.c.orig 2009-01-06 12:55:56.109268085 -0500 +++ nagios-plugins-1.4.11/plugins/popen.c 2009-01-06 12:56:10.569486214 -0500 @@ -133,8 +133,8 @@ spopen (const char *cmdstring) strcpy (cmd, cmdstring); /* This is not a shell, so we don't handle "???" */ - if (strstr (cmdstring, "\"")) - return NULL; + /* if (strstr (cmdstring, "\"")) + return NULL; */ /* allow single quotes, but only if non-whitesapce doesn't occur on both sides */ if (strstr (cmdstring, " ' ") || strstr (cmdstring, "'''")) Thx. Lucas Reproducible: Always Steps to Reproduce: 1.emerge any Nagios-plugin version 2.query snmp with "string" in command line 3. Actual Results: Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] xxx.xxx.xxx.xxx:161 NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."string" Expected Results: SNMP OK - OK |
Thanks for posting your solution -- assigning to nagios-plugins maintainers
This has been reported upstream?
(In reply to comment #2) > This has been reported upstream? > What do you mean? Lucas
(In reply to comment #3) > (In reply to comment #2) > > This has been reported upstream? > > > What do you mean? Are the upstream developers aware of this issue?
This patch looks like a hack, please report upstream.