Page 1 of 1

check_snmp command to show vlan for port

Posted: Sat Sep 15, 2012 12:22 am
by Tal
system: Ubuntu 10.04
nagios: 3.4.1

I am trying to use check_snmp to show vlan of cisco switchports
check_command check_snmp! -v 2c -C xxx -o ifName.10001,ifDescr.1,ifOperStatus.10001,ifPhysAddress,ifLastChange

According to my OID list for my switch (snmp v2c) IF-MIB::ifDescr.1=STRING: Vlan1

However, it's listing all my ports as if they were assigned to Vlan1....so I've either got the wrong OID, or I need to use another check_command to list the proper Vlan for the specified port.

Any help in how (or which) command I should use is much appreciated.

Re: check_snmp command to show vlan for port

Posted: Sun Sep 16, 2012 6:22 pm
by jsmurphy
I'm not really sure what the "nice name" for the vlan table is, but for Cisco devices the OID is: .1.3.6.1.4.1.9.9.68.1.2.2.1.2.X where X is the Interface index number.

So try using .1.3.6.1.4.1.9.9.68.1.2.2.1.2.10001

Re: check_snmp command to show vlan for port

Posted: Thu Sep 20, 2012 9:55 pm
by Tal
Thanks, JSMURPHY..

That was just what I needed.

Tal