cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9953
Views
0
Helpful
16
Replies

EEM Ping Applet

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

16 Replies 16

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

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"] {

Review Cisco Networking for a $25 gift card