You are here: Home > Products > Network Monitor Pro > Switch Monitoring

Switch Monitoring: How to Monitor Managed Switches and Other Network Equipment over SNMP

network switch monitoring

In this article, we will tell you how to monitor the status and parameters of managed switches or other networking hardware using 10-Strike Network Monitor Pro.

When managing a computer network, you must monitor the servers' performance parameters and the availability of hosts and services. You also need to monitor the status of the networking hardware. Any big computer network includes switches, hubs, and routers. In fact, such devices are highly specialized computers. Just like conventional computers, they have cooling fans that may fail, CPUs that may overheat, memory that may overflow, and network interfaces that may crash. If a server fails, several services running on it will become unavailable. But if a network switch or router fails, a subnet consisting of hundreds of hosts, or even the entire network, may go dark!

Networking hardware is usually more reliable than servers or workstations, but you need to monitor it just in case. You can monitor the port status, temperature, fan status, voltage, and even power consumption of a switch. In case of an optical switch, you can also monitor the signal strength. You can also use formulas to monitor the average data rate, traffic usage, etc.

There are very few methods that you can use to communicate with network switches. If you want to get any parameters of a managed switch, you will have to use the SNMP protocol. SNMP stands for Simple Network Management Protocol, so it is supposed to be simple. But nowadays, networking devices have so many monitoring parameters that you need to refer to the documentation to check which parameters are available in the specific model. Each parameter in the device's internal database (Management Information Base, or MIB) has a unique identifier (object identifier, or OID) that consists of several digits separated by dots (for example, 1.3.6.1.2.1.1.3.0). If you want to get a specific parameter, you need to send an SNMP request to the device, passing the OID of that parameter. Of course, you need to know the OID. But how can you get it? The answer to the question is a little bit complicated.

To help you select the most important parameters that you may want to monitor, we've prepared a table that contains the most common OIDs of different vendors' switches (see below). We will also show you how easy it is to set up monitoring of a network switch in 10-Strike Network Monitor Pro.

OID

Purpose

All Switches

1.3.6.1.2.1.2.2.1.10: *
1.3.6.1.2.1.2.2.1.16: *

Traffic on interface (incoming and outgoing) in bytes. The 32-bit counter.

1.3.6.1.2.1.31.1.1.1.6... *
1.3.6.1.2.1.31.1.1.1.10: *

Traffic on interface (incoming and outgoing) in bytes. The 64-bit counter.

1.3.6.1.2.1.2.2.1.20: *
1.3.6.1.2.1.2.2.1.20: *

Errors on interface (incoming and outgoing)

CISCO Switches

1.3.6.1.4.1.9.2.1.56.0

Average CPU load for 5 seconds

1.3.6.1.4.1.9.2.1.57.0

Average CPU load for 60 seconds

1.3.6.1.4.1.9.2.1.58.0

Average CPU load for 5 minutes

1.3.6.1.4.1.9.2.1.8.0

Free memory size

1.3.6.1.2.1.1.3.0

Uptime

1.3.6.1.4.1.9.2.1.2.0

Reboot reason

1.3.6.1.4.1.9.9.13.1.3.1.2 **
1.3.6.1.4.1.9.9.13.1.3.1.3 **

Temperature sensors (description and state)

1.3.6.1.4.1.9.9.13.1.4.1.2 **
1.3.6.1.4.1.9.9.13.1.4.1.3 **

Fan sensors (description and state)

1.3.6.1.4.1.9.9.13.1.5.1.2 **
1.3.6.1.4.1.9.9.13.1.5.1.3 **

Power unit voltage (description and state)

1.3.6.1.4.1.9.9.117.1.1.1.1.3.15 ***

Total power load in Watts

1.3.6.1.4.1.9.9.117.1.1.1.1.4.15 ***

Used power in Watts

D-Link Switches

Cable diagnostics is available in DES-3526 and DES-3550 (and possibly in DES-3028 and DES-3052)

Note: It is necessary to work with the pairs 1 and 2 in DES-3028 and DES-3200-28/A1/B1, and use the pairs 2 and 3 in DES-3200-28/C1.

To enable the built-in cable tester, run the following command
snmpset - v 2 c - c private 192.168.1.1 1.3.6.1.4.1.171.12.58.1.1.1.12.21 i 1

where

snmpset is the utility from Net-SNMP

21 is the port number for diagnostics.

Wait for several seconds till the test finishing after its start and check the result

snmpget -v2c -c private 192.168.1.1 1.3.6.1.4.1.171.12.58.1.1.1.12.21

The result value should be different from 2.

1.3.6.1.4.1.171.12.58.1.1.1.3: *

Link state

1.3.6.1.4.1.171.12.58.1.1.1.4: *

Pair 1 state (0 - OK)

1.3.6.1.4.1.171.12.58.1.1.1.5: *

Pair 2 state

1.3.6.1.4.1.171.12.58.1.1.1.6: *

Pair 3 state

1.3.6.1.4.1.171.12.58.1.1.1.7: *

Pair 4 state

1.3.6.1.4.1.171.12.58.1.1.1.8: *

Length of the pair 1, meters

1.3.6.1.4.1.171.12.58.1.1.1.9: *

Length of the pair 2

1.3.6.1.4.1.171.12.58.1.1.1.10: *

Length of the pair 3

1.3.6.1.4.1.171.12.58.1.1.1.11: *

Length of the pair 4

 

1.3.6.1.4.1.171.11.113.1.3.2.2.2.1.3:*
1.3.6.1.4.1.171.11.113.1.2.2.2.2.1.3:*
1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.4:*
1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.4:*
1.3.6.1.4.1.171.11.63.6.2.2.2.1.3:*

Administrative port status (enabled/disabled):

DES-3200-28 A1/B1
DES-3200-18 A1/B1
DES-3200-28 C1
DES-3200-18 C1
DES-3028

 

1.3.6.1.4.1.171.11.113.1.3.2.2.1.1.4:*
1.3.6.1.4.1.171.11.113.1.2.2.2.1.1.4:*
1.3.6.1.4.1.171.11.113.5.1.2.3.1.1.5:*
1.3.6.1.4.1.171.11.113.3.1.2.3.1.1.5:*
1.3.6.1.4.1.171.11.63.6.2.2.1.1.4:*

Availability of the linked state:

DES -3200-28 A 1/ B 1
DES -3200-18 A 1/ B 1
DES-3200-28 C1
DES-3200-18 C1
DES-3028

 

1.3.6.1.4.1.171.11.113.1.3.2.2.2.1.4:*
1.3.6.1.4.1.171.11.113.1.2.2.2.2.1.4:*
1.3.6.1.4.1.171.11.113.5.1.2.3.2.1.5:*
1.3.6.1.4.1.171.11.113.3.1.2.3.2.1.5:*
1.3.6.1.4.1.171.11.63.6.2.2.2.1.4:*

Bandwidth configured by administrator on port:

DES-3200-28 A1/B1
DES-3200-18 A1/B1
DES-3200-28 C1
DES-3200-18 C1
DES-3028

 

1.3.6.1.4.1.171.11.113.1.3.2.2.1.1.5:*
1.3.6.1.4.1.171.11.113.1.2.2.2.1.1.5:*
1.3.6.1.4.1.171.11.113.5.1.2.3.1.1.6:*
1.3.6.1.4.1.171.11.113.3.1.2.3.1.1.6:*
1.3.6.1.4.1.171.11.63.6.2.2.1.1.5:*

Bandwidth on port:

DES-3200-28 A1/B1
DES-3200-18 A1/B1
DES-3200-28 C1
DES-3200-18 C1
DES-3028

1.3.6.1.4.1.171.12.11.1.8.1.2.1

Temperature for DGS-3120

1.3.6.1.4.1.171.11.113.1.3.2.21.2.1.1.4

Loop status on ports (1-normal, 2-loop, 3-error, 4-none) for DES-3200

 

1.3.6.1.4.1.171.10.94.89.89.1.7.0
1.3.6.1.4.1.171.12.1.1.6.1.0
1.3.6.1.4.1.171.12.1.1.6.1
1.3.6.1.4.1.171.12.1.1.6.1.0
1.3.6.1.4.1.171.12.1.1.6.1.0

Average CPU load for 5 seconds:

DGS-3100
DGS-3120
DES-3200
DGS-36xx
DES-3350SR, DES-3052P, DES-3028P, DES-3250TG, DGS-3120

 

1.3.6.1.4.1.171.10.94.89.89.1.8.0
1.3.6.1.4.1.171.12.1.1.6.2.0
1.3.6.1.4.1.171.12.1.1.6.2
1.3.6.1.4.1.171.12.1.1.6.2.0
1.3.6.1.4.1.171.12.1.1.6.2.0

Average CPU load for 60 seconds:

DGS-3100
DGS-3120
DES-3200
DGS-36xx
DES-3350SR, DES-3052P, DES-3028P, DES-3250TG, DGS-3120

 

1.3.6.1.4.1.171.10.94.89.89.1.9.0
1.3.6.1.4.1.171.12.1.1.6.3.0
1.3.6.1.4.1.171.12.1.1.6.3
1.3.6.1.4.1.171.12.1.1.6.3.0
1.3.6.1.4.1.171.12.1.1.6.3.0
1.3.6.1.4.1.171.11.63.1.2.2.1.3.3.0
1.3.6.1.4.1.171.11.63.3.2.1.3.3.0
1.3.6.1.4.1.171.11.63.2.2.1.3.3.0
1.3.6.1.4.1.171.12.1.1.6.3.0
1.3.6.1.4.1.171.12.1.1.6.3.0
1.3.6.1.4.1.171.12.1.1.6.3.0

Average CPU load for 5 minutes:

DGS-3100
DGS-3120
DES-3200
DGS-36xx
DES-3028
DES-3010G
DES-3026
DES-3018
DES-3526
DES-3528
DES-3350SR, DES-3052P, DES-3028P, DES-3250TG, DGS-3120

Hewlett Packard Switches

1.3.6.1.4.1.25506.2.6.1.1.1.1.6:****

Average CPU load for 60 seconds, %

1.3.6.1.4.1.25506.2.6.1.1.1.1.8:****

Memory usage, %

1.3.6.1.4.1.25506.2.6.1.1.1.1.12:****

Temperature, °C

Huawei Switches

1.3.6.1.4.1.2011.6.3.4.1.2:****

Current CPU load, %

1.3.6.1.4.1.2011.6.3.4.1.3:****

Average CPU load for 1 minute, %

1.3.6.1.4.1.2011.6.3.4.1.4:****

Average CPU load for 5 minutes, %

1.3.6.1.4.1.2011.6.3.4.1

OID for getting index (watch the 4**** note below)

1.3.6.1.4.1.2011.6.3.5.1.1.3

Free memory

HUAWEI S2300

1.3.6.1.2.1.2.2.1.8.29 (30 or 31)

1.3.6.1.2.1.2.2.1.14.29 (30 or 31)

1.3.6.1.4.1.2011.5.25.31.1.1.1.1.11.67108873

1.3.6.1.4.1.2011.5.25.31.1.1.3.1.9.67240014

1.3.6.1.4.1.2011.5.25.31.1.1.3.1.8.67240078

Optical port status (GigabitEthernet0/0/1 or 2)

Port's error count (GigabitEthernet0/0/1 or 2)

Switch temperature, °C

Optic receiving/sending level Gi0/0/1, µW

Optic receiving/sending level Gi0/0/2, µW

Notes:

1*) Full OID should end with the interface's index number. You can get the list of ports (interfaces) on a switch using this command:

snmpwalk - v 1 - public 192.168.1.1 1.3.6.1.2.1.2.2.1.2

and get their indexes:

snmpwalk -v1 -public 192.168.1.1 1.3.6.1.2.1.2.2.1.1

where

snmpwalk - is a utility from Net - SNMP,

public - community string (SNMP access password),

192.168.1.1 - switch network address,

 

2**) Full OID address can include an index. For example, 1.3.6.1.4.1.9.9.13.1.3.1.3.1005. You can get the exact OID using this command:

snmpwalk - v 1 - public 192.168.1.1 1.3.6.1.4.1.9.9.13.1.3.1.3

The utility will return the full OID for a variable. For example,

1.3.6.1.4.1.9.9.13.1.3.1.3.1005 = Gauge32: 40

 

3***) The variable value should be multiplied by the power unit voltage and divided by 100. For example, if your power unit voltage is 12V, multiply the variable's result value by 0.12.

 

4****) Full OID address should include an index. For example, 1.3.6.1.4.1.25506.2.6.1.1.1.1.6. 43 . You can get the index using this command:

snmpwalk - v 2 c - c public 192.168.1.1 1.3.6.1.2.1.47.1.1.1.1.2 (OID specified next to the primary OID in the table)

The utility will return the list elements as a result. You will need to pick up the necessary list element and its OID. For example,

SNMPv2-SMI::mib-2.47.1.1.1.1.2.1 = STRING: "HP 7506"
...
SNMPv2-SMI::mib-2.47.1.1.1.1.2.43 = STRING: "HP 384 Gbps Fabric A7500 Module JD194B"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.46 = STRING: "HP 48-Port GbE SFP A7500 Module JD211B"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.47 = STRING: "LSQM1GV48SC0"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.48 = STRING: "HP A7500 8 port 10G SFP+ Module JF290A"
...

 

When using 10-Strike Network Monitor Pro, it is easy to set up monitoring of the above parameters and plot a graph based on them. You need to do the following:

1. Add a host to the monitoring tree and enter the address of the switch that you want to monitor.

adding a host

2. Add an SNMP check for the new host (select a host, click "Add check", and click "SNMP parameter monitoring").

adding SNMP check

3. Enter an OID from the table (see above) into the Monitored parameter (OID) field, specify the community, and define the "successful" and "failed" conditions.

SNMP check configuration

4. Now you can configure a notification in case the switch fails.

alert notification configuration

As soon as you add a new check, 10-Strike Network Monitor Pro will start receiving data from the networking device. The data will be displayed as a graph in the "Monitored parameter" tab. All the data collected by Network Monitor Pro will be stored in its database, so that you can generate a report for any time period.

chart for monitored parameter

10-Strike Network Monitor Pro also allows you to monitor switches using other methods.

1. The "Interface (port) state" check is easier to set up, though it is based on the SNMP protocol. 10-Strike Network Monitor Pro will display a list of network interfaces. If you select one of them, Network Monitor Pro will periodically poll the OID 1.3.6.1.2.1.2.2.1.8.x and get the ifOperStatus. This method is simpler than SNMP monitoring. You don't need to obtain the necessary OID by running snmpwalk to build a list of network interfaces.

switch interface (port) check

2. You can use a formula to calculate the necessary value based on the results of a few SNMP checks. Some performance parameters obtainable via SNMP can only be calculated based on two or more parameters. A simple check allows you to get one parameter at a time. Say, you want to monitor disk space usage. The value returned will be not in bytes but in disk space units, and you will need to separately request the size of a disk space unit. You need to use a formula to calculate free disk space in bytes based on two simple checks. You can also use a formula to calculate a performance as a percentage based on the current value and the highest possible value of a specific performance counter. Say, you want to monitor the data rate. You can use substitution variables to get the current value of the traffic counter, the previous value, and the time interval between them. If you subtract the previous value from the current value, and then divide the difference by the time interval, you will get the data rate in bytes per second.

вычисления по формуле (например, считаем трафик)

3. You can use the "Switch port" check to monitor a port to which a computer is connected. If someone disconnects the computer's network cable from that port and connects it to a different port, the switch port data will be automatically updated, and 10-Strike Network Monitor Pro will notify you about that.

Of course, the list of switch monitoring parameters in this article is far from complete. Feel free to send your networking devices' OIDs with the model names to us, so that we can add them to our table. There are many other kinds of network equipment that you can monitor using SNMP, such as uninterruptible power supply, network attached storage, and server hard drive (via Integrated Lights-Out). We will tell you about them in other articles.

 

Feel free to download a free 30-day trial version of 10-Strike Network Monitor Pro or its simpler version 10-Strike Network Monitor and use it for monitoring your network equipment using SNMP.