SNMP/EEM Script not providing all the outputs configured

Unanswered Question
Mar 21st, 2017
User Badges:
  • Cisco Employee,

Good Afternoon Team, 


I would like to know if you could help me with an issue that i have with a device (3650)


We have tried to configure several times an EEM script for SNMP commands in order to gather information when it stops responding, 


The script has this information:



event manager applet High_CPU_Capture
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.6.1 get-type exact entry-op gt entry-val "80" exit-op lt exit-val "50" poll-interval 5
action 1.01 syslog msg "------HIGH CPU DETECTED----Start"
action 1.02 cli command "enable"
action 1.03 cli command "show clock | append flash:IDF2CaptureCPU.txt"
action 1.04 cli command "show proc cpu sorted | append flash:IDF2CaptureCPU.txt"
action 1.05 cli command "show proc cpu detailed | append flash:IDF2CaptureCPU.txt"
action 1.06 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.07 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.08 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.09 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.10 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.11 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.12 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.13 cli command "show stacks 314 | append flash:IDF2CaptureCPU.txt"
action 1.14 cli command "show snmp | append flash:IDF2CaptureCPU.txt"
action 1.15 wait 5
action 1.16 cli command "show snmp | append flash:IDF2CaptureCPU.txt"
action 1.17 cli command "show proc cpu history | append flash:IDF2CaptureCPU.txt"
action 1.18 cli command "config terminal"
action 1.19 cli command "service log backtrace"
action 1.20 cli command "exit"
action 1.21 cli command "show log | append flash:IDF2CaptureCPU.txt"
action 1.22 wait 1
action 1.23 cli command "show log | append flash:IDF2CaptureCPU.txt"
action 1.24 wait 1
action 1.25 cli command "show log | append flash:IDF2CaptureCPU.txt"
action 1.26 cli command "config terminal"
action 1.27 cli command "no service log backtrace"
action 1.28 syslog msg "------HIGH CPU DETECTED----End"
exit



The problem is that this can barely provide us with 2 or 3 commands when it is triggered, 


We have tried changing the oid (it is for cpu), also changed the trigger (in and out) intervals, 


Verified if the customer is using TACACs for the command that we have to configure, 


We even ran the manual commands: show proc cpu detailed | append flash:IDF2CaptureCPU.txt (as an example) in order to see if that command gets added to the txt file and it works.


However, we still are not able to get the full outputs that we tell the script to add.

Is there something that we are missing or did not notice for it to work properly?

Please let me know if we need to add some outputs in order to get the information needed.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Wed, 03/22/2017 - 06:17
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

This is a relatively common issue.  Make your event spec line:

event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.6.1 get-type exact entry-op gt entry-val "80" exit-op lt exit-val "50" poll-interval 5 maxrun 300

If that doesn't complete, you may need to continue to increase maxrun.

dipicado Thu, 03/23/2017 - 06:47
User Badges:
  • Cisco Employee,

Hi Joe, 


I appreciate the answer, 


I will try it and check the results.


Thank you for the information

Actions

This Discussion