cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2605
Views
0
Helpful
3
Replies

Questions on EEM script of Nexus 7000 monitoring the state change of the switch

adleung
Cisco Employee
Cisco Employee

Dear all,

My client would like to make use of certain feature within the Nexus 7000 supporting similar to “Smart Call Home” feature.  Smart Call Home cannot support individual account and requires to  register with the CCO user ID.  The client would like to monitor on the fly on any status change between Level 0 to 3 in the syslog with specific message header filter.  Do we have any features sending Email alerts to the external Email account?

I have gone in the direction of the EEM script of Nexus 7000.  My clients is trying for some sample EEM script to monitor the state change of the switch.  These are the link.

http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6815/config_guide_eem_configuration_for_cisco_integrated_services_router_platforms.html

http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6550/prod_white_paper0900aecd803a4dad_ps6815_Products_White_Paper.html

Does the EEM script support sending Email to certain Email account?  Do you have any sample script showing this particular feature?

It seems EEM script cannot support Email account statement.  Please see belows

# sh run | in eem

event manager applet eem_log_monitor

# sh run eem

!Command: show running-config eem

!Time: Mon Jun 11 11:06:45 2012

version 5.2(4)

event manager applet eem_log_monitor

  event syslog tag s0 pattern ".*-0-.*"

  event syslog tag s1 pattern ".*-1-.*"

  event syslog tag s2 pattern ".*-2-.*"

  event syslog tag s3 pattern ".*-3-.*"

  tag s0 or s1 or s2 or s3 happens 1 in 0

  action 1.1 cli show logging last 10

# conf t

Enter configuration commands, one per line.  End with CNTL/Z.

ats-tor-core2(config)# event manager applet eem_log_monitor

ats-tor-core2(config-applet)# action 1.2 ?

  cli             Configure a VSH CLI action

  counter         Specify the name of the counter

  event-default   Do default action for the event

  forceshut       Force the entire switch to shut down

  overbudgetshut  Shut down the specified LCs due to power over budget

  policy-default  Do default action(s) of the policy being overridden

  reload          Reload the system or a specific module

  snmp-trap       Send out an SNMP trap

  syslog          Generate a syslog message

I am wondering is it version specific or not.  Do you have any recommendations?  Or, should the client go for the indirect approach, say, EEM sending to another manager trigger the Email sending?

Your help and assistance is very much appreciated.

Regards,

Adrian

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

There isn't any mail action support in NX-OS EEM.  However, EEM 5.x provides the ability to execute a tclsh script from an EEM applet.  You could use Tcl to send your email.  The tcllib package at http://tcllib.sourceforge.net/ offers an smtp.tcl library in the mime module.  You can use this to send your email.

Joe,

Thanks for your information.  I try to find the smtp.tcl script under http://tcllib.sourceforge.net/.  I am running out of luck of it.  Can you give me more hints on it?

Your help and assistance is very much appreciated.

Regards,

Adrian

It's in the MIME module.  You should see an smtp.tcl file.  There is an example on how to use this in the smtpd module.

Review Cisco Networking for a $25 gift card