Page 1 of 1

Would love some ideas on how to monitor switch port duplex

Posted: Tue Jul 29, 2014 5:08 pm
by logic_bomb421
So like the title says, I'm trying to monitor switch port duplex mode. I figured this would be doable using SNMP, however, what I didn't take into account were the older switches we need to monitor duplex on. Currently we're trying to monitor 3COM 4200G 48-port switches. The do appear to support SNMP, but whenever I reference most OIDs, I get errors. We'll take the default port monitoring command/service that comes with Nagios 4.0.7. Right now, I have configured:

Code: Select all

define command{
     command_name   check_snmp
     command_line   $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$
     }
and

Code: Select all

define service{
     use                   generic-service
     host_name             NAME OF SWITCH
     service_description   Port 1 Link Status
     check_command         check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
     }
What this returns in Nagios is really confusing:

Code: Select all

External command error: MIB search path: $HOME/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-SMI): At line 0 in (none)
ifOperStatus.1: Unknown Object Identifier (Sub-id not found: (top) -> ifOperStatus)
Has anyone seen this before?

Also, if someone knows of a better way to monitor port duplex, I'm all ears. I was hoping 3COM copied Cisco (Cisco has a portDuplex OID), but, alas, they did not.

Thank you!

Re: Would love some ideas on how to monitor switch port dupl

Posted: Wed Jul 30, 2014 2:17 pm
by tmcdonald
It looks like your SNMPv2-SMI MIB is missing. Please run the following command and post the output:

Code: Select all

find / -name SNMPv2-SMI.txt

Re: Would love some ideas on how to monitor switch port dupl

Posted: Wed Jul 30, 2014 5:57 pm
by logic_bomb421
Alright, when I run

Code: Select all

find / -name SNMPv2-SMI.txt
my terminal lags for a second like it's thinking and then returns nothing and gives me the root::/# cursor.

Re: Would love some ideas on how to monitor switch port dupl

Posted: Thu Jul 31, 2014 10:21 am
by tmcdonald
Yea, looks like you probably have no MIBs at all. Try running the following:

Code: Select all

yum install -y net-snmp-utils
I believe this should give you the standard MIBs, located by default in /usr/share/snmp/mibs/.

Re: Would love some ideas on how to monitor switch port dupl

Posted: Fri Aug 01, 2014 2:49 pm
by logic_bomb421
So neither the yum or apt-get commands found anything for net-snmp-utils, however I did manage to find http://www.net-snmp.org/, and I downloaded and installed the latest LTS version. Now the find command returns /net-snmp-5.7.2.1/mibs/SNMPv2-SMI.txt.

Re: Would love some ideas on how to monitor switch port dupl

Posted: Fri Aug 01, 2014 2:57 pm
by tmcdonald
Try placing /net-snmp-5.7.2.1/mibs/SNMPv2-SMI.txt into /usr/share/snmp/mibs/ so it's in the default path the system will look for MIBs.

Re: Would love some ideas on how to monitor switch port dupl

Posted: Fri Aug 01, 2014 4:51 pm
by logic_bomb421
Okay, after moving my SNMPv2 text file to the directory you specified, Nagios is now returning the unknown status error:

Code: Select all

External command error: ifOperStatus.1: Unknown Object Identifier (Sub-id not found: (top) -> ifOperStatus) 

Re: Would love some ideas on how to monitor switch port dupl

Posted: Mon Aug 04, 2014 4:53 pm
by tmcdonald
Go ahead and copy over all of the MIBs from /net-snmp-5.7.2.1/mibs/ to /usr/share/snmp/mibs/ since it seems the one I had you move originally relies on some others.