Overview
By referencing variables from alert labels and attributes, you can modify and customize incident severity, title, description, and other information. This is primarily used in two scenarios:Event API Reporting
When reporting custom alert events via the alert Event API, you can use the
title_rule field to customize the alert title.Alert Pipeline
Reference variables in alert pipelines to modify alert severity, title, description, and other information.
Event API Example
title_rule
Specifies
resource and check labels as the alert title.Alert Pipeline Example

Variable Reference Methods
Reference Labels via ${var}
Use [TPL] as prefix and ${} to reference variables. Variable content is extracted from labels; if extraction fails, <no value> is used as a placeholder.
Reference via Golang Template Syntax
Use[TPL] as prefix and {{}} to reference variables (can reference both labels and attributes); if extraction fails, returns an empty string for missing labels.
${} syntax and {{}} syntax have two key differences:- Data scope:
${name}reads only fromLabelsand cannot reference attribute fields;{{}}uses the whole*AlertEventas the data source, so you can access every exported attribute as well asLabels. - Missing-value behavior: when a label is missing,
${}returns<no value>while{{}}returns an empty string.
Supported Attributes
When you use{{}} syntax, the template data object is the alert event (AlertEvent) itself. The main fields you can reference are listed below:
FAQ
What happens if a label doesn't exist when using labels to dynamically generate titles?
What happens if a label doesn't exist when using labels to dynamically generate titles?
Depending on which variable retrieval method you use, the title may retain the original variable information or use
<no value> as a placeholder.