03-27-2017 11:54 AM
I have a simple EEM question. How would I send an email notification to multiple recipients?
This is from an ASR 9000 TCL script.
...
if [catch {smtp_subst [file join $tcl_library email_template_cfg.tm]} result] {
error $result $errorInfo
Something like: _email_to user1@domain.com,user2@domain.com
That's how it was done with an EEM applet on my old Cat 6500.
Thanks, Ron
03-27-2017 02:04 PM
The same will work in IOS-XR. The Tcl code for email is the same in IOS and IOS-XR.
03-28-2017 07:53 AM
I got it to work with no commas between email addresses, used spaces instead.
03-29-2017 05:37 AM
would you mind sharing the whole script?
Im trying to get my Nexus 5k to send me an email when an error occurs and I am totally stuck.
03-29-2017 08:19 AM
Scott,
I just copied the sample script (I'm not a programmer)
from the document http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r6-0/system-monitoring/configuration/guide/b_sysmon_cg60xasr9k/b_sysmon_cg60xasr9k_chapter_011.html#con_1217984
You need to set the appropriate environmental variables through the CLI
hostname cpu domain-name example.com event manager environment _email_server ms.example.net event manager environment _email_to username@example.net event manager environment _email_from engineer@example.net event manager environment _email_cc projectgroup@example.net
check the logs for clues as to why it might be failing. In my case, I was getting this error when I had commas between my email addresses.
Mar 28 10:23:28.858 EST: syslog_dev[93]: noscan PID-69476737: From SMTP server: 550 5.1.1 <,>... User unknown
I also had issues with the domain name. It was set in my running-config, but I had to set the event manager environment variable event manager environment _domainname domain.com
I hope that helps,
Ron
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