Print Friendly
Comments

Monitoring an SNMP-Enabled Router - Part 1

Using the Check a Network Response task it's possible to poll an SNMP enabled device. Part 1 of this guide describes utilization monitoring on devices supporting the Host Resources MIB (IETF RFC 1514) and UCD-SNMP-MIB (typically those running a Linux-based OS). See also Part 2.

Similar counters are available on other devices; Collect CPU Utilization on Cisco IOS Devices

DISCLAIMER: The information provided herein is intended as an example only. No representation is made as to its accuracy, completeness or suitability for a particular purpose or platform (see also the Winserver Wingman EULA). Please test your own implementation thoroughly in the specific environment within which it need function and ensure that it operates as required.

Tested On: Linksys WRT54G running DD-WRT v24-SP2

Processor Load

Six relevant values are defined (UCD-SNMP-MIB); three maintain 1-minute, 5-minute and 15-minute average utilization as a floating-point value (100% is returned as 1.00) and a further three return the same values in integer form (100% is returned as 100).

1.3.6.1.4.1.2021.10.1.3.1  1-Minute Average Load (Decimal)
1.3.6.1.4.1.2021.10.1.3.2  5-Minute Average Load (Decimal)
1.3.6.1.4.1.2021.10.1.3.3  15-Minute Average Load (Decimal)
1.3.6.1.4.1.2021.10.1.5.1  1-Minute Average Load (Integer)
1.3.6.1.4.1.2021.10.1.5.2  5-Minute Average Load (Integer)
1.3.6.1.4.1.2021.10.1.5.3  15-Minute Average Load (Integer)

The task illustrated below, for a router at 192.168.1.1, reads the 5-minute integer average at the same interval and sets an alert if CPU utilization exceeds 50% or 75% on two consecutive checks.

Check CPU load on the gateway router every 5 minutes.

Task Parameters

Task Type: Check a Network Response

Frequency: 5 Minutes

Address: snmp://public@192.168.1.1/1.3.6.1.4.1.2021.10.1.5.2

Port: 161

CAUTION On: (response) ...is not returned or; is numerically more than; 50; 2 times.

FAILURE On: (response) ...is returned and; is numerically more than; 75; 2 times.


Available Memory

Two values (HOST-RESOURCES-MIB) return the available installed memory and the quantity of that memory currently in use.

1.3.6.1.2.1.25.2.3.1.5.101  Memory Total (Typically KB)
1.3.6.1.2.1.25.2.3.1.6.101  Memory Used (Typically KB)

To determine a suitable alert threshold it is first necessary to check what is reported for the total installed. The SNMP Query utility (in Options > General) facilitates testing of a query in the same form;

Which should write something like the following to the clipboard;

Check the value returned by snmp://public@192.168.1.1/1.3.6.1.2.1.25.2.3.1.5.101.
NOTE: The [OID:Type] prefix is informational and not present for a task evaluation.
-----------------------------------------------------------------------------------
[1.3.6.1.2.1.25.2.3.1.5.101:UInt32] 14072
-----------------------------------------------------------------------------------
					

Armed with the reported total memory we can now configure a task to poll the second SNMP node and set alerts should memory utilization ever exceed 90% or 95%;

Check available memory on the gateway router every 5 minutes.

Task Parameters

Task Type: Check a Network Response

Frequency: 5 Minutes

Address: snmp://public@192.168.1.1/1.3.6.1.2.1.25.2.3.1.6.101

Port: 161

CAUTION On: (response) ...is not returned or; is numerically more than; 12664.8; 1 time.

FAILURE On: (response) ...is returned and; is numerically more than; 13368.4; 1 time.


12 August 2016