EEM and syslog ext

Unanswered Question
Oct 3rd, 2008

I'm trying to get EEM to send an email using syslog extensions. The script works when run manually, but it never triggers from syslog.

Here is my syslog extension-

::cisco::eem::event_register_syslog occurs 1 pattern .*%SYS-5-CONFIG.* maxrun 90 queue_priority low nice 1

I have configured following this video-

I am running IOS 12.4(15)T7, but have tried others with the same results.

Any ideas? Thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (1 ratings)
Joe Clarke Fri, 10/03/2008 - 14:47

Leave out the %. Try:

::cisco::eem::event_register_syslog occurs 1 pattern "SYS-5-CONFIG.*" maxrun 90 queue_priority low nice 1

Collin Clark Mon, 10/06/2008 - 05:28

Thanks for the tip Joe. It still does not work, I must have messed something up in the script. I'll go through it again and see what I can find. Thanks,

Collin Clark Mon, 10/06/2008 - 05:30

Actually that did fix it! I had to remove the event manager policy sendmail.tcl and then add it again. Thanks again.

cpartsenidis Tue, 12/13/2011 - 10:55

I've tried to implement this script on my router but came across the following error when the router tried sending the email:

021948: Dec 13 20:45:16.898: %HA_EM-6-LOG: sendmail.tcl: smtp_send_email: error connecting to mail server:

can't read "reply_code_str(": no such element in array

Obviously  the code in the parenthesis ( is what my email  server is returning to the router when it tries to connect. 

Can  someone advise on how I can overcome this issue or declare the system  message the email server will send to the router when it tries to  connect.  Here is an example of what the router gets when trying to connect: ESMTP Exim 4.69 #1 Tue, 13 Dec 2011 20:44:49 +0200

220-We do not authorize the use of this system to transport unsolicited,

220 and/or bulk e-mail.

Many thanks in advanced.


Joe Clarke Tue, 12/13/2011 - 11:17

Can you change the SMTP server to use a space instead of a '-' after the response code?  As you noted, your current banner is not supported by EEM.  The workaround would be to take the library code at tmpsys:/lib/tcl/smtp_lib.tcl, modify it to work with your SMTP server, modify the namespace from ::cisco::lib to something like ::customer::lib, change your code to use ::customer::lib::smtp_*, and then copy the modified smtp_lib.tcl back to your device as a user library file.

If you have more questions about this, please start a new thread.

cpartsenidis Tue, 12/13/2011 - 12:34


Thank you so much for taking the time to reply.

I have opened a new thread as per request and kindly ask if you can help clarify a few questions, keeping in mind that I do not have a heavy programming background, and try to figure my way around using simple logic

Thank you!


This Discussion