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 a new Active Script performance monitor:

  1. From the WhatsUp Gold web interface, go to Admin > Monitor Library. The Monitor Library dialog appears.
  2. Click the Performance tab. The Performance Monitor list appears.
  3. Click New. The Select Performance Monitor Type dialog appears.
  4. Enter or select the appropriate information:
    • Name. Enter a unique name for the performance monitor. This name displays in the Performance Monitor Library.
    • Description. Enter additional information about the monitor. This description displays next to the monitor in the Performance Monitor Library.
    • Script Type. Select either JSCRIPT or VBSCRIPT.
    • Timeout (sec). 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.

    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.

    • Reference variables. Add, edit, or remove SNMP and WMI reference variables using the respective buttons on the right of the dialog.

    Note: 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. Reference variables simplify your scripting code and enable you to write scripts efficiently, without having to use 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. For more information, see Using the context object with performance monitors.

    • Script text. Enter your monitor code here.
  5. Click OK to save changes.
  6. After the monitor has been added to the library, you can enable the monitor through Device Properties > Performance Monitors. For more information, see Enabling performance monitors.

Note: 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?

To edit an existing Active Script performance monitor:

  1. From the WhatsUp Gold web interface, go to Admin > Monitors. The Monitor Library dialog appears.
  2. Click the Performance tab. The Performance Monitor list appears.
  3. Select the performance monitor you would like to edit from the list of current monitors, then click Edit.
  4. Enter or select the appropriate information:
    • Name. Enter a unique name for the performance monitor. This name displays in the Performance Monitor Library.
    • Description. Enter additional information about the monitor. This description displays next to the monitor in the Performance Monitor Library.
    • Script Type. Select either JSCRIPT or VBSCRIPT.
    • Timeout (sec). 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.

    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.

    Note: 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. Reference variables simplify your scripting code and enable you to write scripts efficiently, without having to use 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 to manage in order 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. For more information, see Using the context object with performance monitors.

    • Script text. Enter your monitor code here.
  5. Click OK to save changes.

See Also

Using Performance Monitors

Performance monitors overview

Using the Performance Monitor Library

Working with Performance Monitors

Adding and Editing an APC UPS Performance Monitor

Adding and editing a PowerShell Scripting performance monitor

Example - PowerShell performance monitor scripts

Adding and editing a Printer performance monitor

Adding and editing an SNMP Performance Monitor

Adding and editing a SQL Query performance monitor

SQL Query Builder

Adding and editing an SSH Performance Monitor

Adding and Editing a WMI Formatted Performance Monitor

Adding and editing a WMI Performance Monitor