Adding and editing an Active Script Performance Monitor
: 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:
- Click the tab, then click . The Monitor Library dialog appears.
- Click the tab. The Performance Monitor list appears.
- Click and select from the list to create a new active script performance monitor. Click .
- or -
Select the active script performance monitor you want to change from the list of current monitors, and then click . - Complete the information for the following fields.
- . Type a name for the monitor. This name displays in the Performance Monitor Library.
- . VBScript or JScript.
- . Type a short description for the monitor. This description displays next to the monitor in the Performance Monitor Library.
- .The length of time (in seconds) WhatsUp Gold waits for a response to the poll.
: 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.
- . (For the device-specific Active Script Performance Monitor only). The length of time, in minutes, for the monitor polling interval.
- . Add, Edit, or Remove SNMP and WMI reference variables using the respective buttons on the right of the dialog.
- . Write or paste your monitor code here.
- Add a new variable to the Reference Variables list by clicking .
: 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.
: 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.
- On the Add reference variables dialog, type a name and description for the variable.
- Select the type of object (SNMP) from the list.
- If needed, adjust the and count for connection to the device.
- Click the browse() button next to the Instance box. The SNMP MIB Browser appears.
- Type the share name or IP address of the computer to which you are trying to connect.
- 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.)
- If needed, adjust the and for the computer to which you are trying to connect.
- Click . The SNMP MIB Browser appears.
- 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.
- Click to add the OID to the and in the Add new reference variable dialog.
- Verify the configuration and click to add the variable to the list on the Add active script performance monitor dialog.
- Write or paste your monitor code in the box.
- Click to save changes and add the monitor to the Performance Monitor Library.
: 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:
- On the Add Active Script Performance Monitor dialog, type a and for the monitor as you want it to appear in the Performance Monitor Library.
- 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.
- Choose the type of script (JScript or VBScript) you are using to write the monitor from the drop down menu.
- Add a new variable to the Reference Variables list by clicking .
: 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.
: 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.
- On the Add reference variables dialog, type a name and description for the variable.
- Select the type of object (WMI) from the drop-down menu.
- Click thebrowse () button next to the Instance box. The Performance Counters dialog appears.
- Type the computer name or IP address of the computer to which you want to connect.
- Select a credential from a list of Windows credentials (pulled from the Credentials Library), then click to connect to the computer.
- Use the Performance counter tree to navigate to the performance counter you want to monitor.
- Once you select the performance counter, select the specific instance you want to monitor.
- Click to add the variable to the list on the Add active script performance monitor dialog.
- Write or paste your monitor code in the box.
- Click to save changes and to add the monitor to the Performance Monitor Library.
: 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?