[Nagiosplug-help] Check_snmp - options

Jon Angliss jon at netdork.net
Wed Sep 16 05:59:33 CEST 2009


On Tue, 15 Sep 2009 17:01:19 +0200, Raffaello Poltronieri - Eutelia
SpA <raffaello.poltronieri at eutelia.it>
wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA512
> 
>Hello,
>I'm going to monitor several devices via an SNMP server. Any of them
>is identified by a MIB (last 2 digits are device identifier).
>If result is 0 or 1, the check is ok, if between 2 and 4 is in warning
>state, and over 5 is critical.
>The point is that, quering the OID, the result isn't simply a number,
>but I receive:
>
>SNMPv2-SMI::enterprises.2378.1.1.1.1.2.1.1.4.30.8 = INTEGER: 6
>
>Is it possible to extract the last digit of the string to have a
>status directly by the check, and not to write it to a tmp file and
>parse it?

The plugin parses the results for you... Just use the -w and -c
arguments.  ie:

./check_snmp -w 2 -c 5 -C public -H localhost -o
SNMPv2-SMI::enterprises.2378.1.1.1.1.2.1.1.4.30.8
-- 
Jonathan Angliss
<jon at netdork.net>





More information about the Help mailing list