Adding and editing an Active Script Performance Monitor

Warning: Modifying the configuration of any of the VoIP Active Script Performance monitors is not recommended; doing so prevents the VoIP setup utility from detecting pre-existing VoIP configuration.

For more information on the Active Script Performance Monitor, see Scripting Performance Monitors.

This script performance monitor has a context object used to poll for specific information about the device in context.

We have provided several code samples to help you in creating useful Active Script Performance Monitors for your devices.

To add or edit an active script performance monitor:

  1. Click the Admin tab, then click Monitor Library. The Monitor Library dialog appears.
  2. Click the Performance tab. The Performance Monitor list appears.
  3. Click New and select Active Script Performance Monitor from the list to create a new active script performance monitor. Click OK.
    - or -
    Select the active script performance monitor you want to change from the list of current monitors, and then click Edit.
  4. Complete the information for the following fields.
    • Name. Type a name for the monitor. This name displays in the Performance Monitor Library.
    • Script type. VBScript or JScript.
    • Description. Type a short description for the monitor. This description displays next to the monitor in the Performance Monitor Library.
    • Timeout. The length of time (in seconds) WhatsUp Gold waits for a response to the poll.

    Note: Though the maximum timeout allowed 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.

    • Collection interval. (For the device-specific Active Script Performance Monitor only). The length of time, in minutes, for the monitor polling interval.
    • Reference variable. Add, Edit, or Remove SNMP and WMI reference variables using the respective buttons on the right of the dialog.
    • Script text. Write or paste your monitor code here.
  5. Add a new variable to the Reference Variables list by clicking Add.

    Important: You can add up to 100 reference variables.

    Reference variables simplify your scripting code and enable you to write scripts efficiently, without having to grab a list of device properties, as with the Script Action and Script Active Monitor. They manage the underlying SNMP or WMI mechanisms you would normally have manage to access SNMP or WMI counters on a remote device.

    By using the Context.GetReferenceVariable (variable name), you only need to specify the name of a pre-defined variable. WhatsUp Gold uses device credentials and connects to the target device using SNMP or WMI to retrieve the requested information. This information is stored in a variable that you can use later in your script.

    Important: The use of reference variables in the Active Script Performance Monitor is optional. If you do use them, you must use Context.GetReferenceVariable,for reference variables to be polled and their data graphed.

  6. On the Add reference variables dialog, type a name and description for the variable.
  7. Select the type of object (SNMP) from the Object type list.
  8. If needed, adjust the Timeout and Retries count for connection to the device.
  9. Click the browse (...) button next to the Instance box. The SNMP MIB Browser appears.
  10. Type the share name or IP address of the computer to which you are trying to connect.
  11. Type the SNMP credential used to connect to the device (or click the browse (...) button to access the Credentials Library to create a new credential.)
  12. If needed, adjust the Timeout and Number of retries for the computer to which you are trying to connect.
  13. Click OK. The SNMP MIB Browser appears.
  14. Use the navigation tree in the left panel to select the specific MIB you want to monitor. You can view more information about the property/value at the bottom of the dialog.
  15. Click OK to add the OID to the Performance counter and Instance box in the Add new reference variable dialog.
  16. Verify the configuration and click OK to add the variable to the Reference variable list on the Add active script performance monitor dialog.
  17. Write or paste your monitor code in the Script text box.
  18. Click OK to save changes and add the monitor to the Performance Monitor Library.

    Tip: The SNMP API is useful for writing Active Script Performance Monitors using SNMP. For more information, see Using the SNMP API.

To configure a WMI active script performance monitor:

  1. On the Add Active Script Performance Monitor dialog, type a Name and Description for the monitor as you want it to appear in the Performance Monitor Library.
  2. Type a number for the timeout (in seconds), and for the device-specific Active Script Performance Monitor, type a number (in minutes) for the Collection interval.
  3. Choose the type of script (JScript or VBScript) you are using to write the monitor from the Script type drop down menu.
  4. Add a new variable to the Reference Variables list by clicking Add.

    Important: You can add up to 10 reference variables.

    Reference variables simplify your scripting code and enable you to write scripts efficiently, without having to grab a list of device properties, as with the Script Action and Script Active Monitor. They manage the underlying SNMP or WMI mechanisms that you would normally manage to access SNMP or WMI counters on a remote device.

    By using the Context.GetReferenceVariable (variable name), you only need to specify the name of a pre-defined variable. WhatsUp Gold uses device credentials and connects to the target device using SNMP or WMI to retrieve the requested information. This information is stored in a variable you can use later in your script.

    Important: The use of reference variables in the Active Script Performance Monitor is optional. If you do use them, you must use Context.GetReferenceVariable,for reference variables to be polled and their data graphed.

  5. On the Add reference variables dialog, type a name and description for the variable.
  6. Select the type of object (WMI) from the Object type drop-down menu.
  7. Click the browse (...) button next to the Instance box. The Performance Counters dialog appears.
  8. Type the computer name or IP address of the computer to which you want to connect.
  9. Select a credential from a list of Windows credentials (pulled from the Credentials Library), then click OK to connect to the computer.
  10. Use the Performance counter tree to navigate to the performance counter you want to monitor.
  11. Once you select the performance counter, select the specific instance you want to monitor.
  12. Click OK to add the variable to the Reference variable list on the Add active script performance monitor dialog.
  13. Write or paste your monitor code in the Script text box.
  14. Click OK to save changes and to add the monitor to the Performance Monitor Library.

Warning: 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."

Troubleshooting

Having problems with your WMI monitor returning false negatives?

See Also

Using Performance Monitors

Performance monitors overview

Using the Performance Monitor Library

Working with Performance Monitors

Adding and editing an SNMP Performance Monitor

Adding and editing an SSH Performance Monitor

Adding and editing a WMI Performance Monitor