[afnog] OID value - Resolved
Anibe Onuche
a.onuche at nixp.net
Fri Nov 15 07:47:05 UTC 2013
Thanks to everyone.
The options Hugo gave below worked like a charm
Thanks
Anibe
On 11/13/2013 2:58 PM, Hugo Lombard wrote:
> On Wed, Nov 13, 2013 at 02:14:51PM +0100, Anibe Onuche wrote:
> [...]
>
>> All I have to do is implement a nagios plugin (check_snmp) to send a
>> notification if the integer value = 2
>>
> Does check_ifoperstatus (part of nagios-plugins) not do what you need?
>
> Here's an example against a BNT switch, but IF-MIB is standard, it
> should work just fine against a Cisco:
>
> - Using ifIndex:
>
> $ /usr/lib64/nagios/plugins/check_ifoperstatus -H bntsw1 -k 145
> OK: Interface EXT1 (index 145) is up.
> $
>
> - Using ifDescr:
>
> $ /usr/lib64/nagios/plugins/check_ifoperstatus -H bntsw1 -d EXT1
> OK: Interface EXT1 (index 145) is up.
> $
>
> - against a down port:
>
> $ /usr/lib64/nagios/plugins/check_ifoperstatus -H bntsw1 -d INT6A
> CRITICAL: Interface INT6A (index 139) is down.
> $
>
> - ifOperStatus:
>
> $ snmpget -v 2c -c <somecommunity> bntsw1 ifOperStatus.145
> IF-MIB::ifOperStatus.145 = INTEGER: up(1)
> $ snmpget -v 2c -c <somecommunity> bntsw1 ifOperStatus.139
> IF-MIB::ifOperStatus.139 = INTEGER: down(2)
> $
>
> This is on a CentOS 5.x box with nagios-plugins-1.4.15-2.el5.rf from
> RPMforge.
>
More information about the afnog
mailing list