Adding 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.
: 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.
To add a new Active Script action:
- From the WhatsUp Gold web interface, go to then click in the Actions Management tree. The Actions page appears.
- Click . The Edit Action page appears.
- Select from the list. The boxes for the Active Script action appear.
- Enter or select the appropriate information:
- . Enter a unique name for the action. This name displays in the Action Library.
- . (Optional) Enter additional information about the action. This description displays next to the action in the Action Library.
- . Enter the length of time WhatsUp Gold attempts to connect to the selected device. When the time you enter is exceeded without connecting, a timeout occurs and WhatsUp Gold stops trying to connect to the SMTP server. This is considered a failed connection.
: Though the maximum timeout is 60 seconds, you are discouraged from using a timeout longer than the default of 10 seconds. You are encouraged to use the shortest timeout possible.
- . Select the scripting language that you want to use to write this active script (either VBScript or JScript).
- . Enter your action code here.
: We do 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.
- Click . The action is added to the Actions list.