Check_snmp -d & -s

Tristan Drinkwater tristand at micro-p.com
Fri Feb 11 12:32:54 CET 2011


Hi,

I have just tried that not but dice. :(

-----Original Message-----
From: Giles Coochey [mailto:giles at coochey.net]
Sent: 11 February 2011 11:25
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Check_snmp -d & -s

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: giles at coochey.net
Skype: gilescoochey




Micro Peripherals Limited.
Registered Office: Shorten Brook Way, Altham Business Park, Altham,
Accrington, Lancs. BB5 5YJ.  Tel: (01282) 776776   Fax: (01282) 858790
Micro Peripherals Limited. Registered in England No. 1511931. VAT No. GB 864 4387 91

DISCLAIMER:
This e-mail and attachments are confidential and are intended solely for the use of the individual to
whom it is addressed. Any views or opinions presented are solely those of the author and do not
necessarily represent those of Micro Peripherals Limited.
If you are not the intended recipient, be advised that you have received this Email in error and that
any use, dissemination, forwarding, printing, or copying of this Email is strictly prohibited. If this
transmission is received in error please notify the sender immediately and delete this message from
your E-mail system.
All electronic transmissions to and from Micro Peripherals Ltd are recorded and may be monitored.

------------------------------------------------------------------------------
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 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