Sending An Snmp Notification In Response To An Event In The Event Policy; Configuration Example For Port Tracking - Cisco Nexus 9000 Series Configuration Manual

Nx-os system management configuration guide, release 6.x
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents

Advertisement

Configuration Example for Port Tracking

This example shows the use of an SNMP OID that is polled at an interval of 10 seconds and has a threshold
value of 95 percent:
switch# configure terminal
switch(config)# event manager applet test_policy
switch(config-applet)# event snmp oid 1.3.6.1.4.1.9.9.305.1.1.1.0 get-type exact entry-op
gt entry-val 95 exit-op lt exit-val 90 poll-interval 10

Sending an SNMP Notification in Response to an Event in the Event Policy

You can use this type of configuration to cause a critical event trigger to generate an SNMP notification.
This example shows how to send an SNMP notification for an event from the Event Manager applet
configuration mode:
switch(config-applet)# action 1.1 snmp-trap intdata1 100 intdata2 300 strdata "CPU Hogging
at switch1"
switch(config-applet)# action 1.1 snmp-trap intdata1 100 intdata2 300 strdata "Port Failure
eth9/1"
This configuration triggers an SNMP notification (trap) from the switch to SNMP hosts. The SNMP payload
carries the values of user-defined fields intdata1, intdata2, and strdata.
Configuration Example for Port Tracking
This example shows how to configure the state of one port to match the state of another port (port tracking).
To configure the port tracking of Ethernet interface 3/23 by Ethernet interface 1/2, follow these steps:
Procedure
Step 1
Create an object to track the status of Ethernet interface 3/23.
Example:
switch# configure terminal
switch(config)# track 1 interface ethernet 3/23
switch(config-track)# end
Step 2
Configure an EEM event to shut Ethernet interface 1/2 when the tracking object shuts down.
Example:
switch(config)# event manager applet track_3_23_down
switch(config-applet)# event track 1 state down
switch(config-applet)# action 1 syslog msg EEM applet track_3_23_down shutting down port
eth1/2 due to eth3/23 being down
switch(config-applet)# action 2 cli conf term
switch(config-applet)# action 3 cli interface ethernet 1/2
switch(config-applet)# action 4 cli shut
switch(config-applet)# end
Step 3
Configure an EEM event to bring up Ethernet interface 1/2 when Ethernet interface 3/23 comes up.
Example:
switch# configure terminal
switch(config)# event manager applet track_3_23_up
switch(config-applet)# event track 1 state up
switch(config-applet)# action 1 syslog msg EEM applet track_3_23_down bringing up port
Cisco Nexus 9000 Series NX-OS System Management Configuration Guide, Release 6.x
250
Embedded Event Manager System Events and Configuration Examples

Advertisement

Table of Contents
loading

Table of Contents