A title template is used when alert events are opened by the condition. It overrides the default title.
Why use a title template?
An alert condition is the foundation for alert event creation. Whether you're using our guided mode or crafting a condition from a chart or policy, using a unique title template is the final step to creating an alert condition.
Using the title template is optional but we recommend it. An alert condition defines a set of thresholds you want to monitor. If any of those thresholds are breached, an alert event is created. Meaningful title templates help you pinpoint issues and resolve outages faster.
Before you begin
Here are some key things to note before you use our title template:
- Compatibility: The title template feature is available for NRQL conditions only.
- Character limit: The maximum length for a title template is 256 characters.
- Formatting: The title template must follow a valid Handlebars format.
- Lost signal alert events: For alert events triggered by a lost signal, the default title will always be used. To learn more about signal loss, see Loss of signal and gap filling.
Understand the title template
Let's say you run an e-commerce site and you have created an alert condition to trigger an alert event when networks errors are high. You can use a title template to make alert events from this condition easily identifiable.
You have named this alert condition High Network Errors. But you want the alert event title to reflect more information about the entity and priority.
Example:
Affecting - - This template would generate the following alert event title:
High Network Errors Affecting Entity123 - Kubernetes Pod - CriticalUse the title template
You can interact with the title template in two ways: through the UI or using GraphQL. Follow these steps to learn how.
Use attributes to further define your condition
You can include a subset of alert event attributes in your title templates to add more context.
Here's how:
Use the format
{{AN_ATTRIBUTE}}. For example:has triggered an alert eventTag attributes: For tags, use the format
{{tags.TAG_NAME}}.Facet clause tags: If a NRQL condition uses a
FACETclause, you can usetagsformatting to use those values in your title template. For example, if the NRQL query includedFACET hostName, cluster, you could then use this:Host , cluster alert event
Tag names cannot contain spaces, but the expanded values can. For a full list of available attributes, see Alert event attributes.