04-20-2013 09:56 AM
Hi there,
I'm trying to copy running-config to tftp-server whenever a "copy run start" was executed.
event manager applet SAVE_TO_TFTP
event cli match "copy running-config startup-config"
action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.cfg vrf management
action 2.0 event-default
Works as expected, but I'd like to append the filename with a timestamp. However if i try this
action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.$(TIMESTAMP).cfg vrf management
the variable $(TIMESTAMP) will be parsed immediately to this:
action 1.0 cli copy running-config tftp://1.2.3.4/directory/switchname.2013-04-20-18.52.00.cfg vrf management
Is there a way to get the actual eem execution timestamp? When using the same syntax in a scheduler config this works great...
Regards
Pille
04-24-2013 11:10 AM
I know IOS has such a parameter, but I don't see the same parameter in NX-OS. The only parameter I know will work is $command (the command that was run). I did some tests, but I don't see a way to do what you want unless you use EEM to execute a tclsh script. That will give you the ability to build whatever timestamp you want, but it isn't officially supported.
04-27-2013 03:59 AM
Hi Joseph,
I find it strange that a system variable is already there and can be used with a scheduler job but not with eem, but that seems to be the situation as it is today.
Thanks for your help anyway
regards
Pille
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