cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
851
Views
0
Helpful
1
Replies

snmp alerts

DJames
Level 1
Level 1

What is a good way to configure SNMP alerts/traps on a cisco switch to send a trap to a Syslog server is a utilization on a port exceeeds a threshold for a certain amount of time?  Example over 85% for longer than 5 min?

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You can do this with the Embedded Event Manager.  These applet policies should work with just about any modern IOS.  This will watch GigabitEthernet0/0 to see if its utilization goes over 85% and stays there for five minutes.  If it does, an EEM trap will be sent.

event manager environment q "

!

event manager applet watch-interface

event tag e1 interface name GigabitEthernet0/0 parameter txload entry-op ge entry-val 204 entry-type value exit-op le exit-val 204 exit-type value poll-interval 10

event tag e2 interface name GigabitEthernet0/0 parameter rxload entry-op ge entry-val 204 entry-type value exit-op le exit-val 204 exit-type value poll-interval 10

trigger

  correlate event e1 or event e2

action 01 cli command "enable"

action 02 cli command "config t"

action 03 cli command "event manager applet notify-interface"

action 04 cli command "event timer countdown time 300"

action 05 cli command "action 1.0 snmp-trap strdata $q Interface GigabitEthernet0/0 has been above 85% utilization for five minutes$q"

action 06 cli command "end"

!

event manager applet reset-int-watch

event tag e1 interface name GigabitEthernet0/0 parameter txload entry-op le entry-val 204 entry-type value exit-op ge exit-val 204 exit-type value poll-interval 10

event tag e2 interface name GigabitEthernet0/0 parameter rxload entry-op le entry-val 204 entry-type value exit-op ge exit-val 204 exit-type value poll-interval 10

trigger

  correlate event e1 or event e2

action 1.0 cli command "enable"

action 2.0 cli command "config t"

action 3.0 cli command "no event manager applet notify-interface"

action 4.0 cli command "end"

Review Cisco Networking for a $25 gift card