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

SourceForge.net noreply at sourceforge.net
Thu Feb 22 04:20:09 CET 2007


Feature Requests item #1650176, was opened at 2007-02-01 13:58
Message generated for change (Comment added) made by sf-robot
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: Closed
Priority: 5
Private: No
Submitted By: Andrew Elwell (elwell2000)
Assigned to: Thomas Guyot (dermoth)
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: SourceForge Robot (sf-robot)
Date: 2007-02-21 19:20

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

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

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

Comment By: Thomas Guyot (dermoth)
Date: 2007-02-07 05:43

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

This feature request will auto-close in 14 days of inactivity.

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

Comment By: Thomas Guyot (dermoth)
Date: 2007-02-02 06: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