cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2337
Views
0
Helpful
5
Replies

Auto Email on event - EEM script for NxOS

jbhanderi671
Level 1
Level 1

I generated EEM script for Duplicate IP address detection, but i do not know how to trigger email in NxOS.

event manager environment emailto "xyz@abc.com"

event manager applet Duplicate_IP

  description "Detect Duplicate IP and Send Trap"

  event syslog pattern "%ARP-2-DUP_SRC_IP"

  action 1.0 snmp-trap strdata "Duplicate IP Detected on Host $hostname"

  action 2.0 cli sh logg last 100

  action 3.0 event-default

Somebody know how to trigger email. There is no good document on EEM email triggering mechanism.

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

This is not currently possible on NX-OS.  NX-OS 7.0 will officially support calling a script (Tcl, Python) from an EEM applet, so one will be able to use a script to trigger the email.

Hello Joseph,

Will Nexus 7k support calling a script this year?

I haven't seen a roadmap on NX-OS 7.0.  I'm not certain when it will be released.

TyrelB919
Level 1
Level 1

I'd like to implement this as well directly from NX-OS without have to rely on a remote syslog server to email me on syslog messages.

Not sure if this would work in NxOS but I think it would go something like this;

Specify the action of sending a short e-mail when the EEM applet is triggered via the event syslog pattern you already have defined:

     Router(config-applet)#  action label mail server server-address to to-address from from-address subject subject body body-text

Remember to define the EEM environment variables first when setting up the applet as follows:

   event manager environment  _email_server

   event manager environment  _email_to

   event manager environment  _email_from