A Commands
action snmp-trap
15
Cisco Nexus 7000 Series NX-OS System Management Command Reference
OL-25806-03
action snmp-trap
To specify the generation of a Simple Network Management Protocol (SNMP) trap when an Embedded
Event Manager (EEM) applet is triggered, use the action snmp-trap command. To disable the SNMP
trap, use the no form of this command.
action label snmp-trap [intdata1 integer] [intdata2 integer] [strdata string]
no action label snmp-trap [intdata1 integer] [intdata2 integer] [strdata string]
Syntax Description
Defaults None
Command Modes Embedded event manager
Supported User Roles network-admin
vdc-admin
Command History
Usage Guidelines This command does not require a license.
Examples This example shows how to specify an SNMP trap to generate when an EEM applet is triggered:
switch# configure terminal
switch(config)# event manager applet snmp-applet
switch(config-applet)# action 1.7 snmp-trap strdata "EEM detected server failure"
switch(config-applet)#
label Unique identifier that can be any string value. Actions are sorted and run in an
ascending alphanumeric sequence using the label as the sort key. If the string
contains embedded blanks, enclose it in double quotation marks.
intdata1 integer (Optional) Specifies an integer to be sent in the SNMP trap message to the SNMP
agent.
intdata2 integer (Optional) Specifies a second integer to be sent in the SNMP trap message to the
SNMP agent.
strdata string (Optional) Specifies a string to be sent in the SNMP trap message to the SNMP
agent. If the string contains embedded blanks, enclose it in double quotation
marks.
Release Modification
4.0(1) This command was introduced.