Alert template fields

List of template fields available in Butler alert messages.

Template fields

Butler uses the Handlebars library for templating work.

Handlebars offers a lot of useful features (nested template fields, evaluation context, template comments) and it’s recommended that you browse through at least the language features section of their getting started guide to get a feeling for what’s possible.

Note that Handlebars supports nested template fields. The nesting notation is plain JSON, examples below.

If a template field is used for an alert type where that field is not supported, the field will simply be blank. No errors will occur.

The following template fields are available in alert messages.

Note that some fields are usually (always?) empty, for example the script log for stopped messages.
This is simply how Sense works - the template fields just forward the information retrieved from the Sense APIs.

Failed
reload
Stopped
reload
Field name Description
hostName Server on which a reload or other event took place.
user Reload failures: User ID for use doing the reload. Typically sa_scheduler.
Reload stopped: User ID of user stopping the reload.
taskId ID of reload task that failed/was stopped.
appName Name of Sense whose reload failed/was stopped.
appId ID of Sense app whose reload failed/was stopped.
logTimeStamp Timestamp as recorded in the Sense logs
logLevel Log level of the Sense log file entry causing the alert
logMessage Log message from the Sense log files
executingNodeName Name of the server where the reload took place
executionDuration.hours executionDuration is a JSON object.
Duration of reload (hours part)
executionDuration.minutes Duration of reload (minutes part)
executionDuration.seconds Duration of reload (seconds part)
executionStartTime.startTimeUTC JSON object.
UTC timestamp for reload start
executionStartTime.startTimeLocal1 Reload start timestamp, format 1
executionStartTime.startTimeLocal2 Reload start timestamp, format 2
executionStartTime.startTimeLocal3 Reload start timestamp, format 3
executionStartTime.startTimeLocal4 Reload start timestamp, format 4
executionStartTime.startTimeLocal5 Reload start timestamp, format 5
executionStopTime.stopTimeUTC JSON object.
UTC timestamp for reload end
executionStopTime.stopTimeLocal1 Reload end timestamp, format 1
executionStopTime.stopTimeLocal2 Reload end timestamp, format 2
executionStopTime.stopTimeLocal3 Reload end timestamp, format 3
executionStopTime.stopTimeLocal4 Reload end timestamp, format 4
executionStopTime.stopTimeLocal5 Reload end timestamp, format 5
executionStatusNum Final reload task status code
executionStatusText Final reload task status message
executionDetails[].timestampUTC executionDetails is an array of status updates for the reload task, similar to the one found in the QMC’s task view.
UTC timestamp of the task status
executionDetails[].timestampLocal1 Task status timestamp, format 1
executionDetails[].timestampLocal2 Task status timestamp, format 2
executionDetails[].timestampLocal3 Task status timestamp, format 3
executionDetails[].timestampLocal4 Task status timestamp, format 4
executionDetails[].timestampLocal5 Task status timestamp, format 5
executionDetails[].detailsType Task status timestamp, format 1
executionDetails[].message Task status message
scriptLogHeadCount Number of lines extracted from the start of the script log
scriptLogHead The first x lines from the reload’s script log
scriptLogTail Number of lines extracted from the end of the script log
scriptLogTailCount The first y lines from the reload’s script log
qliksSenseQMC Links to QMC, as defined in main config file
qliksSenseHub Links to Hub, as defined in main config file