Using the Active Script Monitor

The Active Script Monitors let you write either VBScript or JScript code to perform specific customized checks on a device. If the script returns an error code, the monitor is considered down. A variety of Active Script resources are available on the Active Scripts resources page.

Note: Please be aware that Ipswitch does not support the custom scripts that you create; only the ability to use them in the Active Script Monitor.

As an example, the DNS monitor is a simple service Monitor that checks for the DNS (Domain Name Server) on port 53. If no DNS service responds on this port, then the service is considered down.

To configure a DNS Monitor:

  1. Go to the Active Monitor Library:
    • From the web interface, click GO. The GO menu appears.
    • If the WhatsUp section is not visible, click WhatsUp. The WhatsUp section of the GO menu appears.
    • Select Configure > Active Monitor Library. The Active Monitor Library appears.

      - or -

      From the main menu of the console, select Configure > Active Monitor Library. The Active Monitor Library appears.

  2. In the Active Monitor Library, do one of the following:
    • Click New. The Select Active Monitor Type dialog appears.
    • Select Active Script Monitor from the list, then click OK. The Add Active Script Monitor dialog appears.

      - or -
      Select an existing Active Script Monitor, then click Edit. The monitor properties dialog appears.

  3. Enter or select the appropriate information in the following fields.
    • Name. The name of the monitor as it appears in the Active Monitor Library.
    • Description. The description of the monitor as it appears in the Active Monitor Library.
    • Timeout. The amount of time (in seconds) WhatsUp Gold should wait for a response to the poll.

      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 you want to use to write this script (either VBScript or JScript).
    • Script text. Write or insert your monitor code here.
    • Use in discovery. Select this option to have the monitor appear in the Active Monitor list during discovery. From there, you can select the monitor to have WhatsUp Gold discover that monitor type in your devices.
  4. Click OK to save changes.

This script monitor has a context object that you can use to poll for specific information about the device in context. For more information, see Using the Active Script Monitor context object.

We have provided several code samples for you to create useful active script monitors for your devices. For more information, see Examples: Active Script Monitor context code

All script features in WhatsUp Gold use the SNMP API. For more information, see Using the SNMP API.