Event Triggers for Timers
uberAgent timers are configuration items that specify when and how often metrics are collected. Classic uberAgent timers operate on a fixed schedule, collecting data at static time intervals. Event triggers extend classic timers by enabling uberAgent to collect data when a specified event occurs on the endpoint, independent of the time.
Classic timers and event triggers are compatible and can be used together. You can, for example, configure a timer to run a script once when a user has logged on to a new session and continue to run the script periodically for every session on the endpoint. This ensures that information about new sessions is collected quickly after the logon and that information about older sessions is refreshed regularly. This is but one use case for event triggers. Please see below for full-featured examples.
[EventTrigger] starts a new event trigger configuration block. Please note that every event trigger must be linked to a
[Timer] stanza (see the examples below).
Event triggers are configured using the following configuration settings:
|Name||Specifies the name of an event trigger. This name must be linked in the
|Type||The type of event that triggers the timer. This configuration option may be used more than once per
||Any event type from the list below. Example:
|Query||The query rule to limit trigger evaluation using uAQL.||Please refer to the uAQL documentation.||No|
The following table lists the event types that can be used with the
Type field of the
|UserLogon||This event type is triggered shortly after a user logs on to the endpoint (on average, after half the duration of the
|SessionConnectionStateChange||This event type is triggered each time a user’s session state changes.||Windows|
|SessionRoaming||This event type is triggered each time a session is roamed to another endpoint.||Windows|
Event Triggers for timers support the following metrics:
In this example, the metric
UserTags is collected through a standard timer run at a specific interval. Using the standard timer configuration, uberAgent collects the metric
UserTags for all users logged on to the endpoint at the execution time. Since this metric supports the usage of event triggers, uberAgent can collect this metric upon the occurrence of a specified event for a single user instead of all logged-in users. This example shows that the metric
UserTags is collected every 10000 ms and when a
UserLogon event occurs.
[Timer platform=Windows] Name = Determine user tags Comment = Determine user tags Interval = 10000 UA metric = UserTags EventTrigger = TriggerUserTags [EventTrigger platform=Windows] Name = TriggerUserTags Type = UserLogon
Please find more examples of configuring User & Host Tags here.
This example shows a standard timer to collect the metric
CitrixSessionConfig. To collect data for a single user that logs on, disconnects, or continues the session on another endpoint, all event types need to be configured within the
[EventTrigger] stanza. The event trigger in this example is limited to Citrix sessions only by using the uAQL query
BrokerType == "Citrix". Using this limitation ensures that the data collection is only started for Citrix remoting sessions.
[Timer platform=Windows] Name = Citrix session configuration details Comment = Collect Citrix HDX metrics Interval = 900000 UA metric = CitrixSessionConfig EventTrigger = TriggerCitrixSessionConfig [EventTrigger platform=Windows] Name = TriggerCitrixSessionConfig Type = UserLogon Type = SessionConnectionStateChange Type = SessionRoaming Query = BrokerType == "Citrix"
This example describes a standard timer that executes a custom script at a defined interval. This timer can also be enriched with an event trigger so that the script is started on the occurrence of a particular event. In this configuration example, the script is executed in the script context
UserSessionAsUser. Therefore, uberAgent executes this script additionally for a user that logs on and collects data only for this user.
[Timer platform=Windows] Name = CustomScriptTrigger Comment = Executes a custom script Interval = 10000 Script = powershell.exe -executionpolicy bypass -file "C:\Program Files\vast limits\uberAgent\scripts\test-script.ps1" ScriptContext = UserSessionAsUser EventTrigger = TriggerCustomScript [EventTrigger platform=Windows] Name = TriggerCustomScript Type = UserLogon
Event Triggers can be limited in evaluation using uAQL. The following table shows the options that are available for a query.
The following properties are available if one of the listed events is triggered.
|Property name||uAQL Data Type||Description|
||Integer||The session id of the associated user.|
||String||The broker type. (
||Integer||The system’s connection state id. This value is from WTS_CONNECTSTATE_CLASS.|
||String||Computername of the remoting client.|
||String||IP address of the remoting client.|
||Integer||Previous system’s connection state id. This value is from WTS_CONNECTSTATE_CLASS.|
||String||Previous computer name of the remoting client.|
||String||Previous IP address of the remoting client.|