After you activate an event handler, you can configure various options. For example, you can specify if the event-handler script runs more than once and how multiple triggers are handled.
-
Activate an event handler, as described in
Configuring an event-handler profile:
device# configure terminal
device(config)# event-handler activate eventHandler1
-
To specify a delay from when a trigger is received until execution of the event-handler action, enter the
delay command.
device(config-activate-eventHandler1)# delay 60
The above example specifies a delay of 60 seconds.
-
To specify multiple iterations of the action when a trigger is received:
-
Enter the
iterations command.
-
To specify an interval between iterations, enter the
interval command.
device(config-event-handler-eventHandler1)# iterations 3
device(config-activate-eventHandler1)# interval 30
The above example sets the number of iterations to 3 and specifies an interval of 30 seconds between each iteration.
-
To specify a maximum number of minutes to wait for an action script to complete execution, enter the
action-timeout command.
device(config-activate-eventHandler1)# action-timeout 30
The example sets the timeout to 30 minutes.
-
To limit action-recurrence upon multiple trigger-events, enter one of the following commands:
-
If multiple triggers are defined, to specify that the action run only if all of the triggers occur, enter the
trigger-function AND time-window command.
device(config-activate-eventHandler1)# trigger-function AND time-window 120
The above example specifies that the action run only if all triggers occur within 120 seconds.