An explanation of the variables used for Workflows.
Variables
Use the variables from the issue entity to select the kind of issues you would like to send as well as the message template which appear on the notifications.
Here's a comprehensive list of variables:
Key (First word will be used for grouping) | Display name (First word will be used for grouping) | Description |
---|---|---|
accumulations.conditionDescription | conditionDescription | The condition's custom violation description |
accumulations.conditionFamilyId | conditionFamilyId | The incident detection condition's ID that generated the violation |
accumulations.conditionName | Alert Condition Names | New Relic violated condition |
accumulations.origin | Issue Origin | New Relic or third party source that created the issue |
accumulations.policyName | Alert Policy Names | Incident detection policy name that generated the violation |
accumulations.source | Issue Source | The target system reported by the source |
activatedAt | Issue Activated At | Timestamp of Issue activation |
annotations.description | Issue Description | List of all incident descriptions |
annotations.title | Issue Title | List of all incident titles |
closedAt | Issue ClosedAt | Timestamp of Issue closure, null if the issue is not closed |
createdAt | Issue CreatedAt | Timestamp of Issue creation |
entitiesData.entities | Impacted Entities Data | A list of objects describing the impacted entity name, id, type and kind |
entitiesData.ids | Impacted Entities IDs | A set of all impacted entity ids |
entitiesData.kinds | Impacted Entities Kinds | A set of all impacted entity kinds |
entitiesData.names | Impacted Entities Names | A set of all impacted entity names |
entitiesData.types | Impacted Entities Types | A set of all impacted entity types |
incidentIds | Incident IDs | A list of all the issue's aggregated incidents |
isCorrelated | Issue Is Correlated | Is Issue correlated |
issuePageUrl | Issue Page URL | A direct link to the relevant issue Page |
issueActivatedAtUtc | Issue ActivatedAt UTC string | String format of issue activation in UTC |
issueClosedAtUtc | Issue ClosedAt UTC string | String format of issue closure in UTC |
issueCreatedAtUtc | Issue CreatedAt UTC string | String format of issue creation in UTC |
issueId | Issue ID | The unique id of the issue |
labels.accountIds | Issue Environment Associated Account ID | New Relic AI's enviroinments associated account ID |
labels.aggregationKeys | Labels Alerts Aggregation Key | New Relic Incident detection original incident ID |
labels.originalAccountIds | Labels Account IDs | Incident detection policy's account ID |
labels.policyIds | Labels Alert Policy IDs | Incident detection policy IDs that generated the violation |
priority | Issue Priority | Issue's priority level |
priorityText | Issue Priority text | Issue priority in lower case |
state | Issue State | Issue's current state |
stateText | Issue state text | Issue's state in lower case |
status | Issue Status | Issue's current status |
totalIncidents | Incident Count | The number of incidents that are aggregated or correlated in the issue |
triggeredAt | Issue Triggered At | Timestamp of Issue notification triggered |
triggerEvent | Issue Notification Trigger Event | The notification trigger event |
updatedAt | Issue Updated At | Timestamp of Issue last updated |
workflowName | Workflow Name | The name of the workflow that was triggered |
Workflow data enrichment examples
To get information about the entity that violated 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: