Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

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
Cisco Employee

Yes.  If that OID is above 90

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

4 REPLIES
Cisco Employee

You're right about how this

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.

New Member

Hi Joseph, Thank you for

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

Cisco Employee

Yes.  If that OID is above 90

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

New Member

Joseph, Fantastic.Cheers mate

Joseph,

 

Fantastic.

Cheers mate.

 

Carlton

256
Views
0
Helpful
4
Replies