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 with 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
Specifies
resource and check labels as the alert title.Alert pipeline example

Variable reference methods
Reference labels with ${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 with Go template syntax
Use[TPL] as prefix and {{}} to reference variables (can reference both labels and attributes); a missing label shows <no value>. Reference a specific label as {{.Labels.name}}.
The two syntaxes differ in data scope:
${name} reads only from labels, not attribute fields, while {{}} can use the fields in the table below and labels. When a label is missing, both syntaxes show <no value>.Supported attributes
When you use{{}} syntax, you can reference these alert fields:
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?
With either
${} or {{}}, a missing label shows as <no value> at that position in the title.