The Active Script Performance monitor enables you to write VBScript and JScript to easily poll one or more SNMP or WMI values, perform math or other operations on those values, and graph a single output value. You should only use the Active Script Performance Monitor when you need to perform calculations on the polled values. Keep in mind that although you can poll multiple values using the feature, only one value will be stored to the database: the outcome of your scripted calculation.

The Active Script performance monitor requires one or more of the following credentials:

  • SNMPv1
  • SNMPv2
  • SNMPv3
  • WMI

Configure the Active Script performance monitor using the following boxes:

  • Name. Enter a unique name for the performance monitor. This name displays in the Monitor Library.
  • Description. (Optional) Enter a short description for the performance monitor. This description displays next to the performance monitor in the Monitor library.
  • Script type. Select either JScript or VBScript.
  • Timeout. Enter the length of time WhatsUp Gold attempts to connect to the selected device.
  • Polling interval. Specify how often WhatsUp Gold should request updated information from the device.
  • Reference variables. Add, Edit, or Remove SNMP and WMI reference variables . Please note, the use of reference variables in the Active Script performance monitor is optional. For additional information, please see Using Reference Variables with Script Monitors.
  • Script text. Enter your monitor code.

To configure an SNMP Active Script performance monitor:

  1. Click from the Add Active Script Performance Monitor dialog to add a new variable to the Reference variables field. The Add New Reference Variable dialog appears.
  2. Enter the appropriate information:
    • Variable name. Enter a unique name for the variable.
    • Description. (Optional) Enter a short description for the variable.
  3. Select the SNMP radio button.
  4. Enter the Timeout and Retries count for connection to the device. These are optional field entries.
  5. Click Select to launch the MIB Browser.
  6. Enter the name or IP address of the computer you are you are trying to connect to in the Select counters from computer box. You can click browse (...) to select a device from a list.
  7. Select the SNMP Credential used to connect to the device. You can also click browse (...) to access the Credentials Library to create a new credential.
  8. Adjust the length of time and the number of retries for the computer you are trying to connect to in the Timeout and Number of retries boxes.
  9. Click OK.
  10. Use the navigation tree to select the specific MIB you want to monitor. You can view more information about the property/value at the bottom of the dialog.
  11. Click OK to add the OID to the Performance counter and Instance fields in the Add New Reference Variable dialog.
  12. Verify the configuration and click OK to add the variable to the Reference variables list in the Add Active Script Performance Monitor dialog.
  13. Write or paste your monitor code in the Script text field.
  14. Click OK to save changes.

To configure a WMI Active Script performance monitor:

  1. Click from the Add Active Script Performance Monitor dialog to add a new variable to the Reference variables field. The Add New Reference Variable dialog appears.
  2. Enter the appropriate information:
    • Variable name. Enter a unique name for the variable.
    • Description. (Optional) Enter a short description for the variable.
  3. Select the WMI radio button.
  4. Click Select to launch the MIB Browser.
  5. Enter the name or IP address of the computer you are you are trying to connect to in the Select counters from computer box. You can click browse (...) to select a device from a list.
  6. Select the Windows Credential used to connect to the device. You can also click browse (...) to access the Credentials Library to create a new credential.
  7. Click OK.
  8. Use the navigation tree to select the specific MIB you want to monitor. You can view more information about the property/value at the bottom of the dialog.
  9. Click OK to add the OID to the Performance counter and Instance fields in the Add New Reference Variable dialog.
  10. Verify the configuration and click OK to add the variable to the Reference variables list in the Add Active Script Performance Monitor dialog.
  11. Write or paste your monitor code in the Script text field.
  12. Click OK to save changes.

Keep In Mind

  • You need to include error handling in your monitor script. Your script either needs a value to graph by using Context.SetValue, or you must use Context.SetResult to tell WhatsUp Gold that the script failed.
  • Context.GetReferenceVariable will return 'null' if the poll fails for any reason.
  • If you do not have a call to SetValue or SetResult, the script does not report any errors and no data is graphed.
  • If SetValue is used, it is not necessary to use SetResult, as SetValue implicitly sets SetResult to 0, or "good."
  • Results from this performance monitor are displayed on Custom Performance Monitors full and dashboard reports.
  • Errors from this performance monitor are displayed in the Performance Monitor Error log, as well as EventViewer.exe.
Important: The first time that you poll a WMI reference variable that requires two polls in order to calculate an average (such as "Processor\% Processor Time"), it returns "Null."