An explanation of the variables used for New Relic alerts workflows.
When creating a workflow, you can use variables to a) govern what types of issues will generate a notification, and b) what the contents of a notification payload will contain. This screenshot shows the notification payload section.
Variables
Here are the workflow variables and their descriptions:
Key (first word used for grouping) | Display name (first word used for grouping) | Description |
---|---|---|
| conditionDescription | The condition's custom incident description. |
| conditionFamilyId | The incident detection condition's ID that generated the incident. |
| Alert condition names | New Relic breached condition. |
| Alert condition products | New Relic condition type. |
| Incident callback URL | A direct link to the relevant incident callback. |
| Custom metric value function | Custom metric value function. |
| condition metric name | condition metric name |
| NRQL query | NRQL query of the condition. |
| Issue origins | New Relic or third party source(s) that created the incident(s). |
| Alert policy names | Incident detection policy name that generated the incident. |
| Runbook URL | A list of runbook URLs. |
| Issue sources | The system(s) reporting the incident(s). |
| New Relic accounts | New Relic accounts. |
| Affected service | A list of affected services. |
| Assignment group | A list of assignment groups. |
| Cause service | A list of the cause services. |
| Acknowledged by | The user that acknowledged the issue. |
| Issue activated at | Timestamp of issue activation. |
| Issue description | List of all incident descriptions. |
| Issue title | List of all incident titles. |
| Alert facets | Alert facets. |
| Closed by | The ID of the user that closed the issue. |
| Issue ClosedAt | Timestamp of issue closure. Null if the issue is not closed. |
| Closed incidents count | The total number of closed incidents on this issue. |
| Issue CreatedAt | Timestamp of issue creation. |
| Machine learning components | A list of New Relic alerts machine learning components. |
| Machine learning golden signals | A list of New Relic alerts machine learning golden signals. |
| Machine learning suggested responder | (Deprecated) A list of New Relic alerts machine learning suggested responders. |
| Impacted entities data | A list of objects describing the impacted entity name, ID, type, and kind. |
| Impacted entities IDs | A set of all impacted entity IDs. |
| Impacted entities kinds | A set of all impacted entity kinds. |
| Impacted entities names | A set of all impacted entity names. |
| Impacted entities types | A set of all impacted entity types. |
| Impacted entities count | The number of impacted entities for this issue. |
| Incident IDs | A list of all the issue's aggregated incidents. |
| Issue is correlated | If the issue is correlated ( |
| Issue is acknowledged | If the issue is acknowledged ( |
| Issue acknowledge URL | A direct link to acknowledge the issue. |
| Issue close URL | A direct link to close the issue. |
| Issue page URL | A direct link to the relevant issue page. |
| Issue ActivatedAt UTC string | String format of issue activation in UTC. |
| Issue ClosedAt UTC string | String format of issue closure in UTC. |
| Issue CreatedAt UTC string | String format of issue creation in UTC. |
| Issue AcknowledgedAt string | String format of issue acknowledged in UTC. |
| Issue ClosedAt string | String format of issue closure in UTC. |
| Issue duration in milliseconds | The number of milliseconds since the issue opened. |
| Textual issue duration | A human friendly representation of the issue duration. |
| Issue ID | The unique ID of the issue. |
| Issue title | Usually the title of the first incident. |
| Issue UpdatedAt UTC string | Timestamp of issue update in UTC. |
| Issue environment associated account ID | New Relic alerts environments associated account ID. |
| Labels alerts aggregation key | New Relic incident detection original incident ID. |
| Labels account IDs | Incident detection policy's account ID. |
| Labels alert policy IDs | Incident detection policy IDs that generated the incident. |
| Target ID | Target ID. |
| Issue muting state | The calculated muting state of the issue ( |
| Account ID | Account ID. |
| Open incidents count | The total number of open incidents on this issue. |
| Owner | The person that acknowledged the issue. |
| Alert policy URL | Alert policy URL. |
| Issue priority | Issue's priority level ( |
| Issue priority text | Issue priority in lower case ( |
| Issue count | Issue count. |
| Issue state | Issue's life cycle state ( |
| Issue state text | Issue's life cycle state in lower case ( |
| Issue correlation status | The correlation status of the issue. |
| Incident count | The number of incidents that are aggregated or correlated in the issue. |
| Issue triggered at | Timestamp of issue notification triggered. |
| Issue notification trigger event | The notification trigger event ( |
| Issue updated at | Timestamp of issue last updated. |
| Incident chart URL | Link to the incident chart image. |
| Workflow name | The name of the workflow that was triggered. |
Workflow data enrichment examples
To get information about the entity that breached a condition, you can use custom variables as part of the WHERE
statement of the query. For example, to get the state of the EC2 instance use:
SELECT latest(ec2State) FROM ComputeSample WHERE provider = 'Ec2Instance' AND entityName IN {{entitiesData.names}}
This query returns a single value (for example, stopped
), as the query only uses a single field. The variable entitiesData.names
is a list of identifiers for the entities. You can use any other entity properties in the same way.
You can use custom variables to enrich your workflow data queries in different ways: