cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1857
Views
0
Helpful
4
Replies

High CPU Script Explanation

Hello Community,

I have created the following script to send me an email when the cpu has reached 90% and stayed at that level for 60 seconds

 


event manager applet high_cpu 
 event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.3.1 get-type exact entry-op gt entry-val "90" poll-interval 60
 action 1.01 set msg "------HIGH CPU DETECTED----, CPU: $_snmp_oid_val %"
 action 1.02 info type routername
 action 1.03 syslog msg "$msg"
 action 1.04 mail server "10.50.129.56" to "carlton.patterson@skanska.co.uk" from "carlton.patterson@skanska.co.uk" subject "$_info_routername" body "$msg"
!

 

However, I think this script will just poll the router every 60 seconds, is that correct? If so, can someone please help me tweak the script so that it emails me when the CPU has reached 90% and stayed at that level for 60 seconds.

 

Cheers

 

Carlton

1 Accepted Solution

Accepted Solutions

Yes.  If that OID is above 90%, then the overall CPU busy percentage of the device has been at 90 for the last minute.

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

You're right about how this applet works.  It will measure the five second CPU value every 60 seconds.  Change the OID to 1.3.6.1.4.1.9.9.109.1.1.1.1.7.1, and that will give you the one minute CPU snapshot.

Hi Joseph,

 

Thank you for responding and orry for the delayed response.

I'm not sure I've made myself clear. Are you saying the following script will send me an email when the CPU has reached 90% and stayed at 90% for 60seconds.

event manager applet high_cpu 
 event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.7.1 get-type exact entry-op gt entry-val "90" poll-interval 60
 action 1.01 set msg "------HIGH CPU DETECTED----, CPU: $_snmp_oid_val %"
 action 1.02 info type routername
 action 1.03 syslog msg "$msg"
 action 1.04 mail server "10.50.129.56" to "carlton.patterson@skanska.co.uk" from "carlton.patterson@skanska.co.uk" subject "$_info_routername" body "$msg"
!

Cheers mate

 

Carlton

Yes.  If that OID is above 90%, then the overall CPU busy percentage of the device has been at 90 for the last minute.

Joseph,

 

Fantastic.

Cheers mate.

 

Carlton

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: