04-24-2016 11:46 AM
is it possible to have EEM read from a file on an scp server, then load each line of that file into an acl? Basically I want eem to update an acl periodically. I know I can use eem to remove the acl from the interface and add the static parts of the acl back, then add the acl back to the interface. What I need is a loop to read the remote file and add those addresses to the acl.
04-24-2016 01:06 PM
I don't know about reading the file, but there are two ways to run something periodically.
To run something every 1800s you could use:
event manager applet task
event timer watchdog time 1800
action 1.0 cli command "enable"
...
Or use the cron scheduler. To run a task every hour on the hour:
event manager applet task
event timer cron cron-entry "0 * * * *" maxrun 9999999
action 1.0 cli command "enable"
...
04-24-2016 04:28 PM
Yes, thanks. I'm familiar with the scheduling commands.
04-25-2016 07:52 AM
An EEM policy can open an SCP URL if the device supports it and read the contents. It works like reading any other file, only you have to deal with permissions. Alternatively, you can use the CLI to copy the file to the local flash, then have EEM open the local file, read the contents, and then delete the file when done.
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