action (event)
To set an action for an event, use the action command in event configuration mode. To disable the action for an event, use the no form of this command.
action {set | notification}
no action {set | notification}
Syntax Description
set |
Specifies the action for an event. |
notification |
Enables notifications for events. |
Command Default
No action is set for an event.
Command Modes
Event configuration (config-event)
Command History
Release |
Modification |
---|---|
12.4(20)T |
This command was introduced. |
12.2(33)SRE |
This command was integrated into Cisco IOS Release 12.2(33)SRE. |
12.2(50)SY |
This command was integrated into Cisco IOS Release 12.2(50)SY. |
Usage Guidelines
While configuring a set of actions for an event, you can specify the object identifier of the object. You can also configure events to perform activities such as sending notifications or setting a MIB object whenever an event is triggered. If notifications are enabled for an event, the system sends a notification to the SNMP manager whenever the object configured for that event is modified.
Examples
The following example shows how to enable notifications for an event:
Router(config)# snmp mib event owner owner1 name test
Router(config-event)# action notification
Router(config-event-action-notification)# end