Event Log Trigger

See Also

Introduction to Triggers, Available Triggers, Using AMTrigger, Setting an Event Log Watcher Trigger

Description

Triggers the task when the monitored event is added to the Windows Event Log.

Practical Usage

This trigger can be used to make AutoMate react to system or application generated errors that are sent to the Windows Event Log. For example, this trigger can automatically launch a task that e-mails the system administrator if Windows generates a log entry stating that the DNS server could not be contacted. It can also be used to run a task when a subsequent AutoMate task logs an event to the Windows Event Log with the use of the Log Event action.

Parameters

General Tab

 

Log Type

Specifies the type of event log to monitor. The default option is Application, however, other log types can be selected by expanding the list box or a user can simply enter the log type manually.

 

Event Source

Specifies the source of the event in which to monitor. The default option is All Sources, however, expanding the list box will show all available sources on the system to select from, or a user can enter the event source manually.

 

Event Type

Specifies the type of event to monitor. The available options are:

 

 

Event Category

Specifies the event category to monitor. The only available option is All categories.

 

Description

Allows a description of the event to optionally be entered. To search for partial descriptions, use wildcard characters * or ?.

Behavior Tab

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 trigger the task as a result. If disabled, the trigger will ignore the open Notepad window upon startup.

 
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 (disabled by default). This parameter is available in all triggers except the Schedule Trigger.

AMTrigger Parameters

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.

Common AMTrigger Fields

Every instance of AMTrigger populates a list of common fields which are described in the table below.

Name

Data Type

Return Value

AMTrigger.Trigger

String

Returns the name of the event or condition that triggered the task. Each event or condition contains a unique name. For this trigger, the value is always AMEVENTLOGTRIGGER.

AMTrigger.TaskName

String

Returns the name of the managed task that the trigger was attached to. Useful to determine the responsible task when two managed tasks point to the same AML file.

AMTrigger.TriggerredDateTime

String

Returns the date and time when the trigger occurred.

AMTrigger.TriggeredOn

String

Returns the machine name where the trigger occurred.

AMTrigger.WasLocked

Boolean

If the workstation was locked when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.WasLoggedOff

Boolean

If the workstation was logged off when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.AML

String

Returns a verbose set of information about the triggered event or condition in AML (AutoMate Markup Language) format.

 

Exclusive AMTrigger Fields

The AMTrigger fields described in the table below are specific only to the Event trigger.

Name

Data Type

Return Value

AMTrigger.EventType

Text

Specifies the type of event that activated the trigger. The available event types are:

  • Information

  • Warning

  • Error

  • Success Audit

  • Failure Audit

AMTrigger.EventID

 

Text

The Event ID of the logged event that activated the trigger.

AMTrigger.EventSource

 

Text

The source of the logged event that activated the trigger.

AMTrigger.EventCategory

Text

The category of the event that activated the trigger.

AMTrigger.EventDescription

Text

A description of the event that activated the trigger.

AMTrigger.EventTime

Text

Specifies the date/time that the monitored event was logged in the Windows Event Log.

 

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

About Triggers

All Available Triggers

Using AMTrigger