05-02-2024 02:08 PM
Hello Professionals,
Could you please see my EEM script is alright?
- Goal: Want to get 'show ip arp' results everyday 11:00am and send it to tftp server.
- EEM Script:
event manager applet IPARP_LOG
event timer cron cron-entry "0 11 * * *" maxrun 100
action 1 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.log"
When I directly type 'show ip arp | redirect tftp://192.168.1.11/iparp.log', I am able to see result txt file from the 192.168.1.11.
When I check the event manager history, it says applet has been made successfully.
No. Job Id Proc Status Time of Event Event Type Name
10 13 Actv success Wed May 1 12:54:00 2024 timer cron applet: IPARP_LOG
Could you tell me where did I miss?
Thank you for providing your time.
Solved! Go to Solution.
05-02-2024 11:35 PM
how long that taking when you do manually that show ip arp ( do you have many list and taking more than 1minute to log ?)
try below
event manager applet IPARP_LOG
event timer cron cron-entry "0 11 * * *" maxrun 100
action 1 cli command "enable"
action 2 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.log"
action 3 syslog msg "show ip arp completed"
If you using AAA then use below to bypass authorisation
event manager applet IPARP_LOG authorization bypass
05-06-2024 02:11 PM
action 2 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.$_event_pub_sec.log"
if you like to add more then look below thread :
05-02-2024 11:35 PM
how long that taking when you do manually that show ip arp ( do you have many list and taking more than 1minute to log ?)
try below
event manager applet IPARP_LOG
event timer cron cron-entry "0 11 * * *" maxrun 100
action 1 cli command "enable"
action 2 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.log"
action 3 syslog msg "show ip arp completed"
If you using AAA then use below to bypass authorisation
event manager applet IPARP_LOG authorization bypass
05-06-2024 01:45 PM - edited 05-06-2024 02:05 PM
I got correct applet result! appreciate you!!
One more thing please, um, How can I save the file name with date and time?
Cause I found that iparp.log file has been updated due to same filename from the tftp server..
*I found $_event_pub_sec, so action 2 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.log_$_event_pub_sec" could be correct answer..?
Thank you so much!!
05-06-2024 02:11 PM
action 2 cli command "show ip arp | redirect tftp://192.168.1.11/iparp.$_event_pub_sec.log"
if you like to add more then look below thread :
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