cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1473
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
Joe Clarke
Hall of Fame Cisco Employee

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
Hall of Fame 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

Joe Clarke
Hall of Fame Cisco Employee

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

Joseph,

 

Fantastic.

Cheers mate.

 

Carlton

Content for Community-Ad