On 11/02/2011 12:08, Tristan Drinkwater wrote:

Morning all,

I’m trying to refine a few snmp checks I do.

My command looks like this;

./check_snmp –H xx.xx.xx.xx –o READyNAS-MIB::diskState.1 –C nas-drive –P 2c –v

This produces the following;

/usr/bin/snmpget –t 1 –r 5 –m ALL –v 2c [authpriv] xx.xx.xx.xx READYNAS-MIB::diskState.1

READYNAS-MIB::diskState.1 = STRING: “dead”

SNMP OK – “dead” |

Now, as you can see from above, my disk 2 is ‘dead’ but Nagios reports this as ok. I’m under the impression I need to use the ‘–s’ switch to specify what is good and what is bad, based on matching a string from the output.

To me, the output above would suggest that the returning string is “dead” so to get it to report that this is actually bad I should use “-s ok” as “ok” is the string returned on all the other disks that are working ok.

----- working disk---

/usr/bin/snmpget –t 1 –r 5 –m ALL –v 2c [authpriv] xx.xx.xx.xx READYNAS-MIB::diskState.2

READYNAS-MIB::diskState.2 = STRING: “ok”

SNMP OK – “ok” |

----- working disk---

Sadly, this doesn’t work as it seems that “ok” and “dead” aren’t the returning strings. Neither are 1 and 0 as stated in the readynas MIB documentation.

Anyone got any ideas??

Have I messed up the syntax??


Have you tried --eregi="ok"

?

--
Best Regards,

Giles Coochey
NetSecSpec Ltd
NL T-Systems Mobile: +31 681 265 086
NL Mobile: +31 626 508 131
GIB Mobile: +350 5401 6693
Email/MSN/Live Messenger: gi...@coochey.net
Skype: gilescoochey



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to