12-02-2013 07:30 AM
So ... whats wrong with this ? lol
event manager environment quote "
event manager applet top-interface-counter
event cli pattern "topint" sync yes
action 1 cli command "collect top 10 counters interface all interval 10"
action 2 cli command "event manager applet int-pause"
action 2.1 cli command "enable"
action 2.2 cli command "event timer countdown time 11"
action 2.3 cli command "action 1.0 cli command $quoteshow top counters interface report 1"
action 2.4 cli command "action 2.0 cli command $quoteno event manager applet int-pause"
action 2.5 cli command "action 3.0 cli command end"
action 3 cli command "event manager applet int-clear"
action 3.1 cli command "enable"
action 3.2 cli command "event timer countdown time 3"
action 3.3 cli command "action 1.0 cli command $quote clear top counters interface report"
action 3.4 cli command "action 2.0 cli command $quote no event manager applet int-clear"
action 3.5 cli command "action 3.0 cli command end"
action 4 cli command "end"
12-02-2013 08:36 AM
First, is there an existing command in IOS with "topint" in its structure? If not, this will fail outright. You'd need to change the event line to:
event cli pattern "topint" enter
Next, you must put a space between $quote and the start of your command and add another $quote at the end of the command:
action 2.3 cli command "action 1.0 cli command $quote show top counters interface report 1$quote"
Next, you do not enter "config t" mode before you configure your nested applets. You need to add:
action 2.11 cli command "config t"
You'll also need to enter "config t" mode in your nested applets in order to remove the EEM policies.
Finally, action 3.1 can be deleted.
12-02-2013 09:11 AM
Thanks for the quick reply
Sorry noticed the small typo's wrote it in a hurry.
event cli pattern "topint" enter
I wanted when someone enter's "topint" in CLI it will run the script.
12-02-2013 10:42 AM
Then you will need to change the event line has I have shown.
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: