Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuring Actions for SRC VTA Event Handlers (SRC CLI)

    Use the following statement to configure an action that can be invoked by one or more event handlers:

    shared vta group name action action-name {function (db-engine-calculate-interim | db-engine-calculate-usage | db-engine-get-accounts | db-engine-terminate-session | db-engine-update-accounts | mailer-send | sae-set-interim-interval | sae-set-service-timeout | sae-set-user-timeout | sae-start-service | sae-stop-service | scripts-run-external-script | scripts-run-javascript);on-error (abort-event-processing | go-to-next-action | go-to-next-event-handler);parameter;}

    Note: 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 an action and specify a name for the action. For example, to configure an action called act1 in the SRC VTA group called vta1:

      Note: You must not specify the action name as all, because the show vta statistics performance group name action command uses the all option to display event statistics of all actions.

      [edit]user@host# edit shared vta group vta1 action atc1
    2. Specify a function you want the action to call. For example, to have the action call the db-engine-calculate-usage function:
      [edit shared vta group vta1 action atc1]user@host# set function db-engine-calculate-usage
    3. (Optional) Specify any input parameters required for the function.
      [edit shared vta group vta1 action atc1]user@host# set parameter

      The parameters that you need to set depend on what function you specified. Some functions require no input parameters. You can use the “?” completer to see what parameters need to be set, or see Configuring Actions Overview for a complete list of functions and their associated input parameters.

    4. Specify what you want the action to do in response to an error. For example, to configure the action to abort processing if an error occurs:
      [edit shared vta group vta1 action atc1]user@host# set on-error abort-event-processing
    5. Verify your configuration.
      [edit shared vta group vta1 action atc1]user@host# show
      user@host# show
      function db-engine-calculate-usage;
      on-error abort-event-processing;
      
      [edit shared vta group vta1 action act1]
      user@host#
      
    6. Commit your configuration.
      [edit shared vta group vta1 action atc1]user@host# commit

    Published: 2014-12-16