[Nagiosplug-devel] [ nagiosplug-Feature Requests-1650176 ] check_snmp: Passing -Pu to snmpget command

SourceForge.net noreply at sourceforge.net
Fri Feb 2 15:07:16 CET 2007


Feature Requests item #1650176, was opened at 2007-02-01 16:58
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1650176&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Andrew Elwell (elwell2000)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_snmp: Passing -Pu to snmpget command

Initial Comment:
Using a (Badly written) vendor supplied MIB from Areca for a raid card (see http://www.areca.us/support/download/RaidCards/AP_Driver/SNMP_MIBs.zip ) snmpget is only happy if we pass the "-Pu" (ignore underscores) flag to it. I have made a workaround by permanently patching the source of check_snmp.c

PROBLEM:
# snmpget -v1 -c public hostname ARECA-SNMP-MIB::raidState.0              Bad operator (_): At line 20 in /usr/share/snmp/mibs/ARECA-SNMP-MIB.txt
ARECA-SNMP-MIB::raidState.0: Unknown Object Identifier


# snmpget -v1 -c public -Pu hostname ARECA-SNMP-MIB::raidState.0
ARECA-SNMP-MIB::raidState.0 = STRING: "Normal"

WORKAROUND:

                /* asprintf (&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s", */
                /* Hack below to accept underscores as areca mib broken */
                asprintf (&command_line, "%s -Pu -t %d -r %d -m %s -v %s %s %s:%s %s",


But it'd be nice to be able to pass this flag to the check_snmp if needed


Andrew

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

>Comment By: Thomas Guyot (dermoth)
Date: 2007-02-02 09:07

Message:
Logged In: YES 
user_id=375623
Originator: NO

Have you tried:

mibAllowUnderline true

in snmp.conf (not snmpD.conf!) This should fix your problem.

You can also specify numeric OIDs to avoid the need to parse mibs. If you
need to specify multiple OIDs be sure to get the latest CVS (or upcoming
nagios-plugins release) as it fixes a bug where multiple numeric OIDs would
cause check_snmp to load the MIBs.



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

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




More information about the Devel mailing list