Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring Event Handlers (SRC CLI)


Use the following statements to configure event handlers:

To configure an event handler:


We recommend that when you configure event handlers and their actions, you ensure that for any given event, all database operations are performed before any other operations that have permanent effects. This is because if a database error occurs—for example, due to normal contention for database records between different event threads—the SRC VTA rolls back the current database transaction (no changes are made to the database) and then restarts processing the event. If the event performs some other operation other than database operations before such an error, such as start a service, then that other operation is performed again when the event is reprocessed following the error.

  1. From configuration mode, access the statement that configures SRC VTA event handlers. For example, to configure an event handler called evh1 in the SRC VTA group called vta1:


    You must not specify the event handler name as all, because the show vta statistics performance group name event-handler command uses the all option to display event statistics of all event handlers.

  2. Specify an event. For example, to have the event handler handle start events for the service named QuotaInternet:

  3. Specify previously configured actions that the event handler invokes in response to the event. For example, to specify the previously configured actions called act1, act2, and act3:

  4. Specify the condition the event handler uses to determine whether it should handle the event.

    Specify the condition as script written in the JavaScript programming language that must return one of the following Boolean values:

    • True—Event handler should handle the event.

    • False—Event handler should not handle the event.

  5. Specify the priority of the event handler.

    Event handlers with the lower number priority have the highest priority and evaluate the event first.

  6. Verify your configuration.