Using RMON Traps to Monitor the Routers Temperature

Using RMON Traps to Monitor the Router s Temperature

Problem

You want to use remote monitoring (RMON) to have the router monitor and proactively report on overtemperature conditions in the router.

Solution

Create an RMON trap that watches the internal temperature of the router by tracking the backplane temperature:

[edit snmp] aviva@router1# set trap-group overtemperature aviva@router1# set trap-group overtemperature categories rmon-alarm aviva@router1# set trap-group overtemperature targets 10.0.10.1 aviva@router1# edit rmon [edit snmp rmon] aviva@router1# set alarm 1 description "overtemperature for M20 backplane" aviva@router1# set alarm 1 interval 300 aviva@router1# set alarm 1 variable jnxOperatingTemp.1.1.0.0 aviva@router1# set alarm 1 sample-type absolute-value aviva@router1# set alarm 1 rising-threshold 40 aviva@router1# set alarm 1 startup-alarm rising-alarm aviva@router1# set alarm 1 rising-event-index 1 aviva@router1# set event 1 description Heap-Events aviva@router1# set event 1 type log-and-trap aviva@router1# set event 1 community heap-traps

This is an involved configuration, so here's what it looks like when viewed all together:

[edit snmp] aviva@router1# show trap-group overtemperature { categories { rmon-alarm; } targets { 10.0.10.1; } } rmon { alarm 1 { description "overtemperature for M20 backplane"; interval 300; variable jnxOperatingTemp.1.1.0.0; sample-type absolute-value; rising-threshold 40; rising-event-index 1; } event 1 { description Overtemperature-Events; type log-and-trap; community overtemperature; } }

 

Discussion

RMON is an SNMP specification that allows an SNMP agent (your router) to proactively monitor its system health and performance and then send traps to an SNMP manager. The local SNMP agent compares MIB values against predefined thresholds and generates exception alarms without the need for polling by a central SNMP management platform. This is an effective mechanism for proactive management, provided that you have baselined and set the thresholds correctly. RMON also decreases the amount of traffic between the manager and the router because the SNMP manager does not always have to poll for information and it allows the manager to get more timely status reports because the router reports events as they occur.

You can monitor many things. This recipe monitors the router's backplane temperature. The backplane is in the center of the router, so the temperature gives you an idea of whether the router might be overheating. This recipe sets the threshold at 40 degrees Celsius. When this value is exceeded, an RMON event is triggered, a trap is sent, and the event is logged.

To set up RMON, configure the OID and the threshold values that trigger the alarm (with the set alarm commands), the router's response to the alarm (with the set event commands), and the NMS systems to receive the trap (with the set trap-group commands).

The alarm's threshold value can be an actual value, as in these two alarms (set with the sample-type statement and absolute-value option), or the difference between the current value and the last value (set with the delta-value option).

Finally, choose a number to identify the alarm and to link the alarm with the event. Specify the number in the rising-alarm-index statement when monitoring a rising threshold or in the falling-alarm-index statement when monitoring a falling threshold. For alarm 1, rising-alarm-index 1 associates event 1 with this alarm.

The event statement hierarchy defines the router's response to the alarm. In this recipe, the type log-and-trap statement logs both sets of traps. The community statement associates the events with the trap group overtemperature, which sends the traps to the NMS system defined in the targets statement.

When you configure the trap group to handle the RMON event, the category must be rmon-alarm. The targets are all the NMS systems to receive the trap.

Events are generated only when the threshold is first crossed in any one direction, not after each sample period. Once the threshold is crossed, no more events are generated until after the value crosses back into the normal range and again crosses the threshold. This mechanism considerably reduces the quantity of alarms produced by the router, making it easier for you to react when alarms do occur. Keep in mind that because SNMP uses UDP, there is no guarantee of the delivery of the alarm to the SNMP manager.

To verify that the RMON alarm is set, use the following command on the router:

aviva@router1> show snmp rmon alarms Alarm Index Variable description Value State 1 monitor: overtemperature for M20 backplane jnxOperatingTemp.1.1.0.0 22 falling threshold

The Value column in the output shows the current value of the object, which here is 22 degrees. You can verify the temperature by looking at the object's value directly:

aviva@router1> show snmp mib get jnxOperatingTemp.1.1.0.0 jnxOperatingTemp.1.1.0.0 = 22

You can also see it with the show chassis environment command:

aviva@router1> show chassis environment Class Item Status Measurement Power Power Supply A OK Power Supply B Absent Temp FPC 0 OK 28 degrees C / 82 degrees F FPC 1 OK 27 degrees C / 80 degrees F Power Supply A OK 22 degrees C / 71 degrees F Power Supply B Absent SSB 0 OK 30 degrees C / 86 degrees F Backplane OK 22 degrees C / 71 degrees F Routing Engine 0 OK 30 degrees C / 86 degrees F Routing Engine 1 OK 31 degrees C / 87 degrees F Fans Rear Fan OK Spinning at normal speed Front Upper Fan OK Spinning at normal speed Front Middle Fan OK Spinning at normal speed Front Bottom Fan OK Spinning at normal speed Misc Craft Interface OK

To see the events that are set, use this command:

aviva@router1> show snmp rmon events Event Index Type Last Event 1 log and trap

When the backplane temperature crosses the rising threshold, you can see the log using the show snmp rmon logs command.

From the NMS system and from the router, you can retrieve RMON data from the alarmTable, eventTable, and logTable MIB objects. Here's what you would see when looking at the alarm table from the router:

aviva@router1> show snmp mib walk eventTable eventIndex.1 = 1 eventDescription.1 = Overtemperature-Events eventType.1 = 4 eventCommunity.1 = overtemperature eventLastTimeSent.1 = 0 eventOwner.1 eventStatus.1 = 1

 

See Also

RFC 2819, Remote Network Monitoring MIB

Категории