cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3071
Views
15
Helpful
15
Replies

EEM Script for reload

Felixsson1
Level 1
Level 1

Hi,

I've made a EEM applet for reloading a Cisco router after certain part of message appears in syslog.

No.   Class    Type    Event Type   Trap    Time    Registered                          Name
1      applet    user     syslog          Off      Mon     Dec 19 07:21:21 2022     RELOAD
pattern {Text ABC123}
maxrun 20.000
action 1.0 cli command "enable"
action 2.0 cli command "reload"

1.) Why is the text in pattern shown with {} instead with " as I typed?

2.) Trap says it's "off".

3.) In the output below the applet process status is abort so my router never reloads. What I'm missing in the configuration?

Router2#sh event manager history events
No. Job Id Proc Status Time of Event Event Type Name
1 41 Actv abort Mon Dec19 07:24:27 2022 syslog applet: RELOAD
2 42 Actv abort Mon Dec19 07:25:40 2022 syslog applet: RELOAD
3 43 Actv abort Mon Dec19 07:26:52 2022 syslog applet: RELOAD
4 44 Actv abort Mon Dec19 07:28:05 2022 syslog applet: RELOAD
5 45 Actv abort Mon Dec19 07:29:17 2022 syslog applet: RELOAD
6 46 Actv abort Mon Dec19 07:30:30 2022 syslog applet: RELOAD
7 47 Actv abort Mon Dec19 07:31:43 2022 syslog applet: RELOAD
8 48 Actv abort Mon Dec19 07:32:55 2022 syslog applet: RELOAD
9 49 Actv abort Mon Dec19 07:34:08 2022 syslog applet: RELOAD
10 50 Actv abort Mon Dec19 07:35:20 2022 syslog applet: RELOAD

 

EDIT:

This works:

event syslog pattern ".*Unknown modem on SKU type C881G-4G-GA-K9.*"
trigger delay 2000
action 1 cli command "ena"
action 2 cli command "reload" pattern "confirm"
action 3 cli command "y"

15 Replies 15

You are so so welcome 

Review Cisco Networking for a $25 gift card