Active Script (Performance)
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:
Configure the Active Script performance monitor using the following boxes:
- . Enter a unique name for the performance monitor. This name displays in the Monitor Library.
- . (Optional) Enter a short description for the performance monitor. This description displays next to the performance monitor in the Monitor library.
- . Select either JScript or VBScript.
- . Enter the length of time WhatsUp Gold attempts to connect to the selected device.
- . Specify how often WhatsUp Gold should request updated information from the device.
- . 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.
- . Enter your monitor code.
To configure an SNMP Active Script performance monitor:
- Click  from the Add Active Script Performance Monitor dialogto add a new variable to the  field. The Add New Reference Variable dialog appears. from the Add Active Script Performance Monitor dialogto add a new variable to the  field. The Add New Reference Variable dialog appears.
- Enter the appropriate information:- . Enter a unique name for the variable. 
- . (Optional) Enter a short description for the variable. 
 
- Select the radio button.
- Enter the  and  count for connection to the device. These are optional field entries.
- Click to launch the MIB Browser.
- Enter the name or IP address of the computer you are you are trying to connect to in the  box. You can click browse () to select a device from a list.
- Select the  used to connect to the device. You can also click browse() to access the Credentials Library to create a new credential.
- Adjust the length of time and the number of retries for the computer you are trying to connect to in the  and  boxes.
- Click .
- 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.
- Click  to add the OID to the  and fields in the Add New Reference Variable dialog.
- Verify the configuration and click  to add the variable to the  in the Add Active Script Performance Monitor dialog.
- Write or paste your monitor code in the  field.
- Click  to save changes.
To configure a WMI Active Script performance monitor:
- Click  from the Add Active Script Performance Monitor dialogto add a new variable to the  field. The Add New Reference Variable dialog appears. from the Add Active Script Performance Monitor dialogto add a new variable to the  field. The Add New Reference Variable dialog appears.
- Enter the appropriate information:- . Enter a unique name for the variable. 
- . (Optional) Enter a short description for the variable. 
 
- Select the radio button.
- Click to launch the MIB Browser.
- Enter the name or IP address of the computer you are you are trying to connect to in the  box. You can click browse () to select a device from a list.
- Select the  used to connect to the device. You can also click browse() to access the Credentials Library to create a new credential.
- Click .
- 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.
- Click  to add the OID to the  and fields in the Add New Reference Variable dialog.
- Verify the configuration and click  to add the variable to the  in the Add Active Script Performance Monitor dialog.
- Write or paste your monitor code in the  field.
- Click  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 useContext.SetResultto tell WhatsUp Gold that the script failed.
- Context.GetReferenceVariablewill return 'null' if the poll fails for any reason.
- If you do not have a call to SetValue orSetResult, the script does not report any errors and no data is graphed.
- If SetValue is used, it is not necessary to useSetResult, asSetValue implicitly setsSetResult 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.
: 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." 
: 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.