check_snmp command to show vlan for port

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Tal
Posts: 12
Joined: Wed Jun 06, 2012 1:40 pm

check_snmp command to show vlan for port

Post 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.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_snmp command to show vlan for port

Post 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
Tal
Posts: 12
Joined: Wed Jun 06, 2012 1:40 pm

Re: check_snmp command to show vlan for port

Post by Tal »

Thanks, JSMURPHY..

That was just what I needed.

Tal
Locked