cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1157
Views
5
Helpful
5
Replies

How to confirm dialog in event manager applet?

rund
Level 1
Level 1

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?

 

5 Replies 5

pman
Spotlight
Spotlight

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: good
R1#

*Jul 30 17:10:30.249: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at 19:10:30 EET Thu Jul 30 2026

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"

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.

Hello,

 

which device are you configuring this on ?

 

Post the output of:

 

sh ver

debug event manager action cli

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.

Review Cisco Networking products for a $25 gift card