Another way to generate SNMP trap on high CPU load

Yesterday ago I've described how you can use the ERM functionality together with an EEM applet to generate SNMP traps whenever the CPU load exceeds predefined thresholds. When testing this solution, I started to wonder what the snmp-server enable traps cpu threshold command does. After lenghty conversation with uncle Google and Cisco documentation, I found that there's another way to detect and report high CPU load in Cisco IOS: the CPU threshold notification introduced in IOS release 12.3T (and Tassos pointed that out before I had the time to write a post about it :).To use this feature, you have to configure the thresholds with the process cpu threshold configuration command and enable related SNMP traps with the snmp-server enable traps cpu threshold. For example, to send SNMP traps whenever the total CPU load measured over a 30-second interval exceeds 40%, use the following configuration:

snmp-server enable traps cpu threshold
process cpu threshold type total rising 40 interval 30

4 comments:

  1. And you can use the prehistoric "rmon" feature also :-)

    ReplyDelete
  2. I though that one went the same way as Banyan Vines :)) Seriously, I've never ever used it in my life.

    ReplyDelete
  3. Yap Chin Hoong26 May, 2011 05:24

    hi Ivan, RMON can do magic. :-)
    http://www.itcertnotes.com/2011/05/nx-os-cpu-thresholding-snmp-trap-rmon.html

    Below is excerpted from OReilly - Cisco IOS Cookbook 2nd Edition.
    "IOS includes some extremely helpful but seldom-used remote monitoring (RMON) functionality."

    ReplyDelete
  4. How about Cisco Nexus 5K? Is there a similar command?

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.