04-28-2022 01:35 AM
helo
i have a cisco router and i did this eem script to send an email and it is working well :
event manager environment _email_to gg@testmail.com
event manager environment _email_server 192.168.65.3
event manager environment _email_from user1:cisco1234@testmail.com
event manager applet email
event syslog pattern "Interface Loopback1, changed state to down"
action 1.5 cli command "enable"
action 2.0 cli command "show users"
action 2.5 cli command "show int fa0/0"
action 8.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Interface Loopback1, changed state to down" body "$_cli_result"
action 9.0 syslog msg "E-mail was sent"
now i want to do it in cisco nexus 3064 but it is not support
the mail server in action 8.0
and not support
event manager environment _email_to gg@testmail.com
event manager environment _email_server 192.168.65.3
event manager environment _email_from user1:cisco1234@testmail.com
is there a solution for this please
04-28-2022 01:56 AM
Hello,
try the syntax below:
event manager environment email_to "gg@testmail.com"
event manager environment email_server "192.168.65.3"
event manager environment email_from "user1:cisco1234@testmail.com"
04-28-2022 02:02 AM
Thank you for reply but it's not working
04-28-2022 04:45 AM
event manager environment _email_to gg@testmail.com ->
event manager environment emailto “admin@anyplace.com”
04-28-2022 05:04 AM
Thank you it's working for event environment but the action 8.0 (action 8.0 mail server "$_email_server") it's not working any solution please
04-28-2022 03:51 PM - edited 04-28-2022 03:53 PM
as i remember last time i test this was worked :
action 8.0 mail server "10.10.10.10" to "balaji.bandi@mydomain.com" from "nexus@mydomain.com" subject "WAN 1 Link Failed" body "WAN link Failed required Investigation"
Later we moved to Syslog and another alert system. let us know if that works., also look Logs what is the error?
Alternative you can use python email :
http://sjston.blogspot.com/2019/07/cisco-ip-sla-with-eem-email-alerts-on.html
04-28-2022 06:18 PM
04-29-2022 04:36 AM
Let me check again the commands.
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