Configuring event-handler options

  1. Activate an event handler, as described in Configuring an event-handler profile:
    device# configure terminal
    device(config)# event-handler activate eventHandler1
    
  2. 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.
  3. To specify multiple iterations of the action when a trigger is received:
    1. Enter the iterations command.
    2. 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.
  4. 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.
  5. To limit action-recurrence upon multiple trigger-events, enter one of the following commands:
    • trigger-mode only-once—for the duration of a device configuration, the event-handler action is launched only once.
      device(config-activate-eventHandler1)# trigger-mode only-once
      
    • trigger-mode on-first-instance—as long as the device is running, the event-handler action is launched only once. Following a device restart, the event-handler action can be triggered again.
      device(config-activate-eventHandler1)# trigger-mode on-first-instance
      
  6. 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.