Alert descriptions

For some types of New Relic Alerts conditions, you can define a description that passes useful information downstream for better violation responses or for use by downstream systems.

Requirements

The alert description feature is available for these condition types:

  • NRQL alert conditions
  • Infrastructure alert conditions

The description field has a maximum character size of 4k.

What is an alert description?

For some types of alert conditions, you can create an alert description that passes information about a condition and its violations downstream. With a description, you can:

  • Capture the reason for the alert condition
  • Define the signal being monitored
  • Define next steps
  • Add metadata to downstream systems

The Description field allows you to use a general template structure that, when a violation is generated, substitutes the generic sections with specific values. For example, let's say you used this in a description:

This is my condition name : {{conditionName}}
The hostname is : {{tag.fullHostname}}

A violation resulting from this condition would fill in the details and you'd receive a notification like this:

This is my condition name : My Great Alert Condition
The hostname is : ip-123-45-67-89.us-west-1.compute.internal

Create description

To create a description:

To learn about how to structure a description, see the example template and the attribute/tag instructions.

Template example

Here's an example of a description template:

this is my condition name : {{conditionName}}
The hostname is : {{tag.fullHostname}}
Owning Team: {{tag.label.owning_team}}
Product: {{tag.label.product}}
ec2VpcId: {{tag.aws.ec2VpcId}}
Service name : {{tag.label.Name}}
AWS Region : {{tag.aws.awsRegion}}
AWS Availability Zone: {{tag.aws.awsAvailabilityZone}}
Department : {{tag.label.department}}
Environment: {{tag.label.environment}}
Cluster: {{tag.clusterName}}
Cluster Role: {{tag.clusterRole}}
EC2 Instance Type: {{tag.instanceType}}
EC2 InstanceID: {{tag.aws.ec2InstanceId}}
EC2 AmiId: {{tag.aws.ec2AmiId}}
EC2 Root Device Type: {{tag.aws.ec2RootDeviceType}}

And here's an image showing how that data might show up in a notification:

New Relic alert violation description

How to use attributes

The attributes you can use in a description are a subset of attributes attached to the violation event. Some details about the available attributes and how to use them in the description:

  • Violation event attributes: For any of the standard attributes available for use in a description, use the format {{AN_ATTRIBUTE}}. For example:
    The target name is : {{targetName}}
    
  • Tag attributes: For tags, you would use the format {{tag.TAG_NAME}}. There are two types of tags:
    • Entity-related tags: For Infrastructure conditions only. You can find available entity-related tags by going to the New Relic One entity explorer and looking under a service's Metadata and tags, or by viewing violation details. An example of using tags in a description:
      The AWS region is : {{tag.aws.awsRegion}}
      Responsible team : {{tag.label.owning_team}}
      
    • Facet clause tags: For NRQL conditions only. If a NRQL condition uses a FACET clause, you can use tag formatting to use those values in your description. For example, if the NRQL query included FACET hostName, cluster, you could then use this in the description:
      The host is : {{tag.hostName}}
      The cluster is : {{tag.cluster}}
      

Please note that tag names cannot include a whitespace. The expanded values can include a whitespace, but not the names of the tags themselves.

For more help

Recommendations for learning more:

Recommendations for learning more: