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.conditionProduct | Alert Condition Products | New Relic condition type |
accumulations.deepLinkUrl | Violation Callback Url | A direct link to the relevant violation callback |
accumulations.evaluation.metricValueFunction | Custom metric value function | Custom Metric Value Function |
accumulations.evaluation.name | condition metric name | condition metric name |
accumulations.nrqlQuery | NRQL Query | NRQL Query of the condition |
accumulations.origins | Issue Origins | New Relic or third party source(s) that created the incident(s) |
accumulations.policyName | Alert Policy Names | Incident detection policy name that generated the violation |
accumulations.runbookUrl | Runbook URL | A list of Runbook URLs |
accumulations.sources | Issue Sources | The system(s) reporting the incident(s) |
accumulations.tag.account | New relic Accounts | New Relic Accounts |
accumulations.tag.affectedService | Affected Service | A list of affected services |
accumulations.tag.assignmentGroup | Assignment Group | A list of Assignment groups |
accumulations.tag.causeService | Cause Service | A list of the cause services |
acknowledgedBy | Acknowledged By | The user that acknowledged the issue |
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 |
annotations.wildcard | Alert Facets | Alert facets |
closedBy | Closed By | The ID of the user that closed the issue |
closedAt | Issue ClosedAt | Timestamp of Issue closure, null if the issue is not closed |
closedIncidentsCount | Closed Incidents Count | The total number of closed incidents on this issue |
createdAt | Issue CreatedAt | Timestamp of Issue creation |
dataMLModules.components | Machine Learning Components | A list of New Relic AI's ML components |
dataMLModules.goldenSignals | Machine Learning Golden Signals | A list of New Relic AI's ML Golden Signals |
dataMLModules.suggestedResponders | Machine Learning Suggested Responder | A list of New Relic AI's ML Suggested Responders |
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 |
impactedEntitiesCount | Impacted Entities Count | The number of impacted entities for this issue |
incidentIds | Incident IDs | A list of all the issue's aggregated incidents |
isCorrelated | Issue Is Correlated | Is Issue correlated (true, false) |
isAcknowledged | Issue Is Acknowledged | Is Issue acknowledged (true, false) |
issueAckUrl | Issue Acknowledge URL | A direct link to acknowledge the issue |
issueCloseUrl | Issue Close URL | A direct link to close the issue |
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 |
issueDurationMs | Issue Duration In Milliseconds | The number of milliseconds since the issue opened |
issueDurationText | Textual Issue Duration | A human friendly representation of the issue duration |
issueId | Issue ID | The unique id of the issue |
issueTitle | Issue title | Usually the title of the first incident |
issueUpdatedAt | Issue UpdatedAt UTC String | Timestamp of Issue update in UTC |
labels.accountIds | Issue Environment Associated Account ID | New Relic applied intelligence environments 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 |
labels.targetId | Target ID | Target ID |
mutingState | Issue Muting State | The calculated muting state of the issue (MUTED, NOT_MUTED) |
nrAccountId | Account Id | Account Id |
openIncidentsCount | Open Incidents Count | The total number of open incidents on this issue |
owner | Owner | The person that acknowledged the issue |
policyUrl | Alert Policy URL | Alert Policy URL |
priority | Issue Priority | Issue's priority level (CRITICAL, HIGH, MEDIUM, LOW) |
priorityText | Issue Priority text | Issue priority in lower case (Critical, High, Medium, Low) |
realIssueCount | Issue Count | Issue Count |
state | Issue State | Issue's life cycle state (CREATED, ACTIVATED, CLOSED) |
stateText | Issue state text | Issue's life cycle state in lower case (active (opened), closed) |
status | Issue Correlation Status | The correlation Status of the issue |
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 (STATE_CHANGE, INCIDENT_ADDED, INCIDENT_CLOSED, CLOSE_INACTIVE, CLOSED_TTL, USER_ACTION, PRIORITY_CHANGED, MERGE_REQUEST) |
updatedAt | Issue Updated At | Timestamp of Issue last updated |
violationChartUrl | Violation Chart URL | Link to the a violation chart image |
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: