02-20-2015 08:37 AM
Hi,
I'm trying to email an alert by eem script when a catalyst 6807 rises a syslog message for an environment alarm (ex: power down). I use the attached script but when i want to add the syslog message in body email (line 83) something is wrong and i can't fixed the error : catalyst try to execute the syslog message (see email).
Same error for a catalyst 4507 4506 Sup 6L-E 10GE IOS 15.2(1)E but the same script works for a catalyst 4506 Sup 6L-E 10GE IOS 15.0(2)SG.
Any ideas ?
Thanks
02-21-2015 04:26 AM
Hi,
Try a rather simple EEM applet, below is the configuration
event manager applet TEST
event syslog pattern " SYS-1" maxrun 60
action 1.0 cli command "show logg | i SYS-1"
action 1.1 mail server "mail.example.com" to "example@cisco.com" from "example@cisco.com" subject "Usage_Alert" body "$_cli_result
action 2.0 syslog msg "Mail_Sent"
#1. Select trigger event syslog pattern for all environmental syslog
#2. $_cli_result - it temp. variable in which stores last cli result
03-11-2015 03:15 AM
Hi,
I found my mystake. In the script, I commented the command "enable" and thus show commands were not recognized by cli. The script has always worked well, "Invalid input" was the result of show command.
But I suspect a different behavior between versions 15.0 and 15.2 for running level of tcl script.
Thanks
03-11-2015 03:17 AM
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
Hi,
I found my mystake. In the script, I commented the command "enable" and thus show commands were not recognized by cli. The script has always worked well, "Invalid input" was the result of show command. For ios 15.2, i need to gain enable level.
So I suspect a different behavior between versions 15.0 and 15.2 for running level of tcl script.