check_snmp string matching problem
Lewis Getschel
lgetschel at denver.westerngeco.slb.com
Thu Dec 9 23:57:29 CET 2004
All-
I'm having trouble matching the string returned with snmp(get/walk)
with check_snmp, for checking our Network Appliance servers. Using the
mib's I can get the useful string "The system's global status is normal. "
However, getting that to match with the check_snmp plugin is driving
me crazy! And searching the mailing list/google didn't seem to help.
Using snmpget I see that value returned:
688 /usr/local/nagios/etc % /usr/bin/snmpget -v 1 -c public fas0:161
1.3.6.1.4.1.789.1.2.2.25.0
SNMPv2-SMI::enterprises.789.1.2.2.25.0 = STRING: "The system's
global status is normal. "
I thought that matching that string wouldn't be too hard (yeah, right!)
I've tried escaping the single quote:
686 /usr/local/nagios/etc % /usr/lib/nagios/plugins/check_snmp -m
/usr/share/snmp/mibs/netapp.mib.txt -H fas0 -s="The system\'s global
status is normal. " -o NETWORK-APPLIANCE-MIB::miscGlobalStatusMessage.0
SNMP CRITICAL - *"The system's global status is normal. "*
I've tried quoting the quotes:
691 /usr/local/nagios/etc % /usr/lib/nagios/plugins/check_snmp -m
/usr/share/snmp/mibs/netapp.mib.txt -H fas0 -s=""The system's global
status is normal. "" -o NETWORK-APPLIANCE-MIB::miscGlobalStatusMessage.0
Unmatched '.
So I tried both:
692 /usr/local/nagios/etc % /usr/lib/nagios/plugins/check_snmp -m
/usr/share/snmp/mibs/netapp.mib.txt -H fas0 -s=""The system\'s global
status is normal. "" -o NETWORK-APPLIANCE-MIB::miscGlobalStatusMessage.0
SNMP CRITICAL - *"The system's global status is normal. "*
I've tried single quotes outside the doubles, escaping various
quotes...Without going on for a few dozen more pages, I think I've tried
all the combinations. (but must have missed the critical one <smile>)
Does someone have some more experience with check_snmp using strings?
or some help with regular-expression matching with this string?
Any help will be appreciated.
Lewis
--
Lewis Getschel | Today is done...
WesternGeco | Today was fun...
1625 Broadway | Tommorrow is another one.
Denver, CO 80202 |
Direct Phone - 303-389-4407| -- Dr. Seuss --
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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