I have configured EEM applet to run when the CPU usage is greater than 50% and an e-mail containing the result of the "show cpu processes" command was sent to an engineer, I'm sure that I filled with valid mail information but I did not receive anything.
I have based on this document (SNMP Event Detector -page 62) to configure the EEM applet
Writing Embedded Event Manager Policies Using the Cisco IOS CLI
Addition I have attached some files where you can find the results that I got, I tried with different OID's (CISCO-PROCESS-MIB) but I did not get anything.
Here is link for OIDs
I tried to do with other alternatives
a) Load the outputs in a text file in memory and RMON but I did not get a successful result (I am not an expert in EEM and RMON).
Do you know any idea how can I resolve or re-configure the EEM applet ¿?
Okay, this is what you want:
event manager applet highcpu
event snmp oid "220.127.116.11.18.104.22.168.22.214.171.124.1.10.1" get-type exact entry-op ge entry-val 50 exit-op le exit-val 5 poll-interval 5
action 1.0 cli command "enable"
action 2.0 cli command "show proc cpu sorted"
action 3.0 mail server "172.18.24.31" to "[email protected]" from "[email protected]" subject "High CPU Alert" body "$_cli_result"
This will poll the five second CPU utilization of the route processor every five seconds. If the utilization is at or above 50%, the event will fire. The event will not fire again until the CPU drops below 5%, then goes back to 50%.
Note: if you have AAA command authorization enabled, you will need to add:
event manager session cli username USER
To the config. Here, USER is the username of a user who is authorized to run the "enable" and "show proc cpu sorted" commands.