I was trying to get output of tracert and ping then send the result to flash.
below is the snippet of EEM script. It works fine with 38XX series router however it doesnt work with 28XX router.
Is there any other way to achieve the requirement with 28XX router ?
action 5.3 cli command "ping $_sub2"
action 5.4 file open fd flash:TSIP.txt a
action 5.5 file write fd "$_cli_result"
action 5.6 file close fd
action 5.7 cli command "traceroute $_sub2"
action 5.8 file open fd flash:TSIP.txt a
action 5.9 file write fd "$_cli_result"
action 5.91 file close fd
What exactly does not work? It does not write anything, or it can't append? See if the file "TSIP.txt" exists in flash, and delete it first. Run the following debug when EEM runs and post the debug output: "debug event manager action cli".
Is there a difference between the EEM version of 3800 and 2800? Use "show event manager version" for that. If it is, can you upgrade the IOS code on the 2811 to be the same as on the 3800, to get the same EEM version?
Run the latest possible IOS version on 28xx/38xx and see if you get the options in EEM. Otherwise, i have no idea, For "show commands", you could have done the appending from the CLI itself, not needing the "file" option, but for ping/traceroute, this is not an option.
action 5.3 cli command "show version | append flash:TSIP.txt"