03-12-2013 03:34 AM
Hello Community,
Can someone please show me how to add to the following EEM applet so as to add more ip addresses. I would like to add 172.7.7.1, 192.168.0.1, 10.1.1.1
event manager applet pingall
action 1.1 cli command "enable"
action 1.2 cli command "ping 141.231.45.133"
Cheers
Carlton
03-13-2013 02:51 AM
Mike/Joseph,
I've just realised that I need a Tcl script to ping all. This is because I would rather put the ip addresses to be pinged in a file rather than putting 10 or more ip addresses in an enviroment variable on the router.
Is there a way I could include the ip addresses 10.36.36.225 and 10.36.36.227 above into a tcl script rather than as an environment variable?
cheers
03-13-2013 07:01 AM
Put each host in a file called flash:/ping_hosts.txt separated by newlines, then replace the foreach line in your Tcl script with this:
set fd [open "flash:/ping_hosts.txt" "r"]
set contents [read $fd]
close $fd
foreach host [split $contents "\n"] {
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