Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

msg to syslog not working

Hi, I've been palying around a bit with EEM and did this very basic script to reconnect the dialer0 interface every night. It works as intented except the syslog message doesn't get logged...

show run | section event

event manager applet Dialer0_shutdown
 event timer cron cron-entry "30 3 * * *"
 action 010 cli command "enable"
 action 020 cli command "config terminal"
 action 030 cli command "interface Dialer0"
 action 040 cli command "shutdown"
 action 050 cli command "end"
 action 060 syslog msg "interface Dialer0 was set to shutdown by cron + EEM"
event manager applet Dialer0_no-shutdown
 event timer cron cron-entry "32 3 * * *"
 action 010 cli command "enable"
 action 020 cli command "config terminal"
 action 030 cli command "interface Dialer0"
 action 040 cli command "no shutdown"
 action 050 cli command "end"
 action 060 syslog msg "interface Dialer0 was set to no shutdown by cron + EEM"

 

show logging only reveals this:

Jun 25 2014 03:30:00: %DIALER-6-UNBIND: Interface Vi1 unbound from profile Di0
Jun 25 2014 03:30:00: Di0 DDR: dialer shutdown complete
.Jun 25 2014 03:30:00: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to down
.Jun 25 2014 03:30:00: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to down
Jun 25 2014 03:30:22: %DIALER-6-BIND: Interface Vi1 bound to profile Di0
Jun 25 2014 03:30:22: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
Jun 25 2014 03:30:23: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up
Jun 25 2014 03:31:02: %LINK-5-CHANGED: Interface Dialer0, changed state to administratively down
Jun 25 2014 03:32:00: %DIALER-6-UNBIND: Interface Vi1 unbound from profile Di0
Jun 25 2014 03:32:00: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to down
Jun 25 2014 03:32:00: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to down
Jun 25 2014 03:32:02: %LINK-3-UPDOWN: Interface Dialer0, changed state to up
Jun 25 2014 03:32:22: %DIALER-6-BIND: Interface Vi1 bound to profile Di0
Jun 25 2014 03:32:22: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
Jun 25 2014 03:32:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, changed state to up

 

My question is: why does the message not appear in the logging?

    Console logging: level debugging, 530 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 47 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 532 messages logged, xml disabled,
                    filtering disabled
    Exception Logging: size (8192 bytes)
    Count and timestamp logging messages: disabled
    Persistent logging: disabled

 

Best Regards,

Martin

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

While I wouldn't think the

While I wouldn't think the "no shutdown" command would block, perhaps it does in this case.  Enable "debug event manager action cli" reproduce and post the output.  If it really is taking longer than 20 seconds to get to the syslog action, you will need to increase the maxrun on the applets to something like 30 seconds.

2 REPLIES
Cisco Employee

While I wouldn't think the

While I wouldn't think the "no shutdown" command would block, perhaps it does in this case.  Enable "debug event manager action cli" reproduce and post the output.  If it really is taking longer than 20 seconds to get to the syslog action, you will need to increase the maxrun on the applets to something like 30 seconds.

New Member

Hi Joseph, you are right, I

Hi Joseph, you are right, I had to increase the maxrun for both events to more than 60 seconds to make it work.

Thank you!

263
Views
0
Helpful
2
Replies