This custom performance monitor lets you write VBScript and JScript to easily poll one or more 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.
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 take care of the underlying SNMP or WMI mechanisms that you would normally have to deal with 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 will use a device's credentials and connect 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
variables to be polled and their data graphed.
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.
Context.GetReferenceVariablewill return 'null' if the poll fails for any reason.
This script monitor has a context object that you can use 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.
Having problems with your WMI monitor returning false negatives?