Percent Variables

You can customize an action's message and certain configuration content using percent variables.

Note: For a table of WhatsUp Gold Alert Center specific variables, see the topic titled Alert Center Percent Variables.

Important guidelines when using percent variables

Active Monitor Variables

Description

%ActiveMonitor.Argument

SNMP instance number. This is only used when an action is associated directly with an active monitor, and not the device as a whole.

%ActiveMonitor.Comment

String value that coincides with the monitor description. This is only used when an action is associated directly with an active monitor and not the device as a whole.

%ActiveMonitor.Name

 

The name of the active monitor that fired an action. This is only used when an action is associated directly with an active monitor, and not the device as a whole.

%ActiveMonitor.NetworkInterfaceAddress

IP address for the network interface. This is only used when an action is associated directly with an active monitor, and not the device as a whole.

%ActiveMonitor.Payload

The payload returned by a WMI, Exchange, SQL, SNMP or Active Script active monitor. This is only used when an action is associated directly with an active monitor and not the devices as a whole.

For Active Script Active Monitors, the payload is the text that is passed to the SetResult() method in the script.

%ActiveMonitor.State

 

Current status of the monitor, such as "Down at least 5 min." This is only used when an action is associated directly with an active monitor and not the device as a whole.

Device Variables

Description

%Device.ActiveMonitorDownNames

List of down services using the abbreviated name if available.

%Device.ActiveMonitorUpNames

Full service names of all UP monitored services on a device.

%Device.Address

IP address (from device properties).

%Device.Attribute.[Attribute Name]

Returns an attribute from the SNMP information available for the device, such as the Contact name. To specify the attribute, append the category name (listed below) to the end of the variable. For example: %Device.Attribute.Contact, returns the contact name.

Default categories:

  • *. Returns all attributes
  • Info1. Upgrade path from v8
  • Info2. Upgrade path from v8
  • Contact. Contact information from SNMP
  • Location. Location information from SNMP
  • Description. Description information from SNMP
  • Custom. If you have created a custom attribute you can use the name of that custom attribute in the percent variable.

Example:

%Device.Attribute.Phone
%Device.Attribute.RackPosition

Tip: To avoid an parsing error, ensure you include a space or line break at the end of the entire embedded percent variable (in other words, after the attribute name).  

%Device.DatabaseID

Returns the database ID of a device.

%Device.DisplayName

Display Name (from General of device properties)

%Device.HostName

Host Name (from General of device properties)

%Device.Notes

Notes. (Notes are from the device properties Notes)

%Device.SNMPOid

SNMP Object identifier.

%Device.State

Device status description (for example, "Down at least 2 min" or "Up at least 5 min")

%Device.Status

This shows the name of the active monitor, preceded by the device state id.

Example:

10 | DNS.

Device State ID values:

0 = Not Started, 1 = Paused, 2 = Canceled, 3 = Running, 4 = Complete, 5 = Resolving Hostname, 6 = Looking for Type,
7 = Scanning for SNMP Credentials, 8 = Scanning for Windows Credentials, 9 = Device Detail Scan, 10 = Scanning Custom Monitors, 12 = Scanning Custom Monitors, 13 = Device VMWare Host Scan, 14 = Scanning SSH Credentials,
15 = Layer 2 Scan, 16 = Computing Layer 2 Topology, 17 = Wireless Scan, 18 = Scanning Network Interfaces,
19 = Checking for Duplicate Devices, 21 = Scanning for Known Addresses

%Device.Type

Device Type (from General of device properties)

Passive Monitor Variables

Description

%PassiveMonitor.DisplayName

The name of the monitor as it appears in the Passive Monitor Library.

%PassiveMonitor.LoggedText

Detailed Event description. (SNMP traps - Returns the full SNMP trap text.) (Windows Log Entries - Returns information contained in the Windows Event Log entries.) (Syslog Entries - Returns the text contained in the Syslog message.)

%PassiveMonitor.Payload.*

Payload generated by a passive monitor.

%PassiveMonitor.Payload.EventType

The type of passive monitor (Syslog, Windows Event, or SNMP Trap)

%PassiveMonitor.Payload.LogicalSource

Shows the device's logical IP address.

%PassiveMonitor.Payload.PhysicalSource

Shows the device's physical IP address.

System Variables

Description

%System.Date

The current system date. Configure the date format in Regional Options (from Program Options)

%System.DisplayNamesDownDevices

Display names of devices with down monitors

%System.DisplayNamesDownMonitors

 

Shows the name of a device and each monitor that is down on that device. The format of the response is 'device name':'monitor 1','monitor 2','...'

Example: ARNOR: FTP, HTTPS, Ping

%System.DisplayNamesUpDevices

Display names of up devices

%System.DisplayNamesUpMonitors

Shows the name of a device and each monitor that is up on that device. The format of the response is 'device name':'monitor 1','monitor 2','...'

Example: ARNOR: FTP, HTTPS, Ping

%System.InstallDir

Displays the directory on which WhatsUp Gold is installed

%System.NumberofDownDevices

Number of down devices on your network

%System.NumberOfDownMonitors

Shows the number of down monitors on your network

%System.NumberofUpDevices

Number of up devices on your network

%System.NumberOfUpMonitors

Shows the number of up monitors on your network

%System.Time

The current system  time. The format is hh:mm:ss