WMI Trigger

Description

Starts a task when a WQL (WMI Query Language) query executed on the agent machine returns true or more than 0 rows. Queries built using WQL are used to manage and control the WMI service.

Practical Usage

Normally used by Network Managers or Systems Administrators to monitor for common issues to occur on various systems and network components/devices and execute a task to resolve such problems in case they occur. This trigger is specially helpful for Network managers or systems administrators because they can create various tasks to automatically resolve common problems in case they occur. During execution, the task can determine exactly what problem occurred and direct itself to perform proper actions that tries to correct the problem.

Parameters

General properties

Property

Description

WQL

The WMI query that should be executed (e.g. select IDProcess from Win32_PerfRawData_PerfProc_Process where name='iexplore).

The sample query will monitor for the process iexplore to start.

Namespace

the WMI namespace to execute the query under (e.g. root\CIMV2).

Use local computer

If enabled, the trigger will monitor for queries on the local machine (enabled by default).

Use remote computer

If enabled, specifies the computer name or IP address of the remote machine to monitor (disabled by default). If this parameter is enabled, the Use local computer parameter is ignored.

Use specified user

If enabled, indicates that a username/password is required to connect to an Agent (disabled by default). If this parameter is enabled, a valid username and password must be entered in the provided Username and Password text-boxes.

Username

The username used to connect to the remote agent.

Password

The password used to connect to the remote agent.

Polling Interval

Specifies how often this trigger monitors for the resource value. The polling interval is the maximum amount of elapsed time (in seconds) before each status check. The default value is every 1 second.

Behavior Properties

Property

Description

Trigger on startup if condition is true

If enabled, the system will act upon conditions that already exist upon startup of the current trigger. For example, if the Notepad window is already open on the desktop, a newly created Window trigger set to monitor for the existence of a Notepad window will immediately launch the task as a result. If disabled, the trigger will ignore the open Notepad window upon startup. This parameter is disabled by default.

Trigger after the condition has been met 'X' times.

If enabled, specifies how many times the trigger condition must be met before the task is started. For example, if a Window trigger is set to monitor for the appearance of a Notepad window and this parameter is set to 3, the task will not launch until the third instance of Notepad appears on the desktop.

AMTrigger

When this trigger is activated, it automatically passes the "AMTrigger" object to the task. AMTrigger can be used within a task to determine whether or not the task was started by a trigger, which trigger started the task, when the trigger was activated and other trigger related properties. For more details, see Using AMTrigger. The AMTrigger fields listed in the table below are specific only to the WMI trigger.

Name

Type

Return Value

AMTrigger.UserName

Text

Returns the username of the user who logged on when the task was triggered.

 

NOTE: A full list of AMTrigger objects exclusive to each trigger can be viewed from the Expression Builder by expanding Objects -> Triggers and selecting the desired trigger.

See Also

↑ Top of Page