06-10-2013 12:35 PM
In *nix this is as simple as "wc -l" but unfortunately I can't seem to find a simple solution. For the purposes of this thread here is my test script...
event manager applet TEST authorization bypass
event syslog pattern "TRIGGER"
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "show log"
action 4.0 cli command "COUNT NUMBER OF LINES FROM SHOW LOG -- $_cli_result"
Can someone let me know what action 4.0 would be in order to complete this task?
Thanks!
Solved! Go to Solution.
06-12-2013 06:46 AM
This will eventually run on a 6k chassis with 12.2 code so unfortunately this isn't an option. But that is good to know. Thank you!
06-12-2013 08:55 AM
If you need this to run on 12.2 code on the 6500, then everything you've been doing won't work. That code doesn't support programmatic applets. You'll need to conver to using Tcl. You might as well start plugging your applets into http://www.marcuscom.com/convert_applet now to get the Tcl form.
06-12-2013 09:00 AM
Can you please define "programmatic applets"? EEM seems to have all of the functionality we have spoken about in this thread in the code I referenced.
Thanks.
06-12-2013 09:02 AM
Everything regarding regexp, foreach, if, string are only supported in EEM 3.0 and higher. That is only available on the 6500 in 15.x code.
06-13-2013 04:55 AM
According to Cisco's website there isn't 15.x code available for the 6500-E line.
06-13-2013 07:38 AM
As far as I know, 15.x code is only available on the Sup2T for the 6500. And that will work in the 6500-E line.
06-13-2013 07:42 AM
Yes. That is what we are actually running.
06-13-2013 07:44 AM
As you can see, 15.1(1)SY code is available for the Sup2T:
06-13-2013 07:47 AM
Yea, we are waiting for a couple of bug fixes to be released before we put it back into prodcution.
Thank you for all of your help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide