• EnglishEspañol日本語한국어Português
  • Log inStart now

Title template for NRQL alert conditions

A title template is used when incidents are opened by the condition. It overrides the default title.

Why use a title template?

An alert condition is the foundation for incident 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 incident is created. Meaningful title templates help you pinpoint issues and resolve outages faster.

Go to one.newrelic.com > All capabilities > Alerts > Alert Conditions and select a pre-existing alert condition or create a new alert condition to use the title template to easily identify related incidents.

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 incidents: For incidents 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 incident when networks errors are high. You can use a title template to make incidents from this condition easily identifiable.

You have named this alert condition High Network Errors. But you want the incident title to reflect more information about the entity and priority.

Example:

{{conditionName}} Affecting {{entity.name}} - {{entity.type}} - {{priority}}

This template would generate the following incident title:

High Network Errors Affecting Entity123 - Kubernetes Pod - Critical

Use 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 incident event attributes in your title templates to add more context.

Here's how:

  • Use the format {{AN_ATTRIBUTE}}. For example:

    {{conditionName}} has triggered an incident
  • Tag attributes: For tags, use the format {{tags.TAG_NAME}}.

  • Facet clause tags: If a NRQL condition uses a FACET clause, you can use tags formatting to use those values in your title template. For example, if the NRQL query included FACET hostName, cluster, you could then use this:

    Host {{tags.hostName}}, cluster {{tags.cluster}} incident

Tag names cannot contain spaces, but the expanded values can. For a full list of available attributes, see Incident event attributes.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.