Pinging from an EEM applet
A while ago one of my readers wanted to perform an extended ping from an EEM applet. For whatever reason the extended ping syntax wasn’t good enough for him, so I told him to use the pattern parameter of the action cli command EEM applet statement.
Here’s the final result … ugly, but working:
event manager applet ping
event none sync yes
action 100 cli command "enable"
action 101 cli command "ping" pattern "[ip]"
action 102 cli command "ip" pattern "address"
action 103 cli command "10.10.10.10" pattern "count"
action 104 cli command "5" pattern "size"
action 105 cli command "100" pattern "seconds"
action 106 cli command "2" pattern "commands"
action 107 cli command "y" pattern "interface"
action 108 cli command "20.20.20.20" pattern "service"
action 109 cli command "0" pattern "header"
action 110 cli command "no" pattern "data"
action 111 cli command "no" pattern "pattern"
action 112 cli command "0xABCD" pattern "Verbose"
action 113 cli command " " pattern "size"
action 114 cli command "n"
e.g. ping 10.10.10.10 source 20.20.20.20 repeat 5 size 100 timeout 2 data ABCD
Anyway, nice applet, the question is can you make it partially interactive? such as predefining everything else except the ping destination and the repeat count, for example?
I mean, the user only types ping, then it prompts for IP and amount, all the rest is implicit...
thanks IVAN for you HELP.