Adding and editing an Active Script Action

This action allows you to write either VBScript or JScript code to perform a customized action. If the script returns an error code, the action failed.

To add or edit an active script action:

  1. Click the Admin tab, then click Action Library.
  2. Click New to create a new active script action, and then select Active Script Action from the list. Click OK.
    - or -
    From the list of current actions, select the action you want to change, and then click Edit.
  3. Type or select the appropriate information in the following fields.
    • Name. Type a name for the action. This name displays in the Action Library.
    • Description. Type a short description. This description displays next to the action in the Action Library.
    • Timeout. The amount of time (in seconds) WhatsUp Gold should wait for the action script to run.

    Note: Though the maximum timeout is 60 seconds, you are highly discouraged from using a timeout longer than the default of 10 seconds. You are encouraged to use the shortest timeout possible.

    • Script type. Select the scripting language that you want to use to write this active script (either VBScript or JScript).
    • Script text. Write or insert your action code here.

    Note:It is not recommend that you use percent variables in script text, because they may resolve to text containing special characters (' ' (quotes), " " (double-quotes), % (percent), new line characters, and the like) that may break your script.

This script action has a context object you can use to get specific information about the context of the action.

We have provided several code samples for you to create useful script actions for your devices.

All script features in WhatsUp Gold utilize the SNMP API.

Tip: To check the status of an action, or to cancel an action, on the console go to Tools > Running Actions.

See Also

Action Policies

Creating an action policy

Assigning an Action Policy to a Device

Adding and Editing an Action Policy

Configuring an implicit action policy

Example: getting an Email alert when the Web server fails

Using Scripting Actions