10-27-2021 09:51 PM - edited 10-27-2021 09:53 PM
Hi,
I try to add a delayed reload at the end of an event manager script that can ba canceled by another script if a defined "good" event happens.
event manager applet CONFIGURE
...
action 98 cli command "reload in 10"
!
event manager applet STOP_RELOAD
event syslog pattern "good"
action 1 cli command "reload cancel"
!
The Problem is, that there is a confirmation dialog when I enter "reload in 10":
Router#reload in 10
Reload scheduled for 05:11:06 MET(S) Thu Oct 28 2021 (in 10 minutes) by console
Reload reason: Reload Command
Proceed with reload? [confirm]
How can (should) I hit enter in an event manager applet?
10-27-2021 10:19 PM - edited 10-27-2021 10:22 PM
Hi,
Hope the following example helps you,
Note the following command: "send log <Message>"
event manager applet STOP_RELOAD
event syslog pattern "good"
action 1 cli command "enable"
action 2 cli command "reload cancel"
R1#reload in 10
Reload scheduled in 10 minutes by console
Reload reason: Reload Command
Proceed with reload? [confirm]
R1#send log good
R1#
***
*** --- SHUTDOWN ABORTED ---
***
*Jul 30 17:10:30.070: %SYS-7-USERLOG_DEBUG: Message from tty0(user id:
R1#
*Jul 30 17:10:30.249: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at 19:10:30 EET Thu Jul 30 2026
10-28-2021 12:30 AM
Hello,
in addition to pman's post, typically you would confirm a prompt in EEM as below:
action 1.0 cli command "enable"
action 2.0 cli command "reload in 10" pattern "confirm"
action 3.0 cli command "y"
10-28-2021 03:34 AM
It looks like there is a general problem with the "reload" command in event manager:
Oct 28 10:37:03.211 MET(S): %HA_EM-6-LOG: reload : DEBUG(cli_lib) : : IN : Router#reload in 10
Oct 28 10:37:03.215 MET(S): cli_history_entry_add: free_hist_list size=0, hist_list size=7
Oct 28 10:37:03.215 MET(S): eem_no_scan flag set, skipping scan of command_string=reload in 10
Oct 28 10:37:23.235 MET(S): %HA_EM-6-LOG: reload : DEBUG(cli_lib) : : CTL : cli_close called.
(same result with "pattern" extention from the suggestion of Georg Pauwen)
Like the event manager doesn't see the confirmation prompt at all.
10-28-2021 04:24 AM
Hello,
which device are you configuring this on ?
Post the output of:
sh ver
debug event manager action cli
10-28-2021 05:03 AM - edited 10-28-2021 05:04 AM
Maybe instead of reload in 10 you will use the "event timer countdown time <x>":
event manager applet daily_reload
event timer countdown time 600
action 1.0 reload
R1#
*Jul 30 23:53:50.239: %SYS-5-RELOAD: Reload requested by EEM. Reload Reason: Embedded Event Manager action.
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