The action identifier is newrelic.alerts.createStaticNrqlCondition.
Creates a new static NRQL alert condition under an alert policy. A static NRQL condition evaluates a NRQL query on a fixed schedule and opens a violation when the result crosses a fixed threshold.
At least one of terms or expiration (with openViolationOnExpiration: true) must be provided. Omitting both fails NerdGraph validation.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
accountId | Int | Required. The New Relic account in which to create the condition. |
|
policyId | String | Required. The ID of the alert policy to attach this condition to. |
|
name | String | Required. The name of the condition. |
|
nrqlQuery | String | Required. The NRQL query to evaluate. |
|
enabled | Boolean | Required. Whether the condition is active. |
|
terms | List | Conditionally required. The condition's thresholds. Required unless |
|
nrqlDataAccountId | Int | Optional. Account to run the NRQL query against if different from |
|
description | String | Optional. Free-text description of the condition. |
|
runbookUrl | String | Optional. URL of a runbook to link from the condition. |
|
titleTemplate | String | Optional. Handlebars-style template for the violation title. |
|
violationTimeLimitSeconds | Int | Optional. Force-closes an open violation after this many seconds. |
|
signal | Map | Optional. Advanced signal and streaming settings: |
|
expiration | Map | Optional. Loss-of-signal settings: |
|
selectors | List | Optional. JQ selectors to extract values from the response. | |
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
success | Boolean |
|
errorMessage | String | Error message on failure, including NerdGraph errors. |
data | Map | NerdGraph response. Use |
The following example creates a static NRQL condition and captures its ID for use in subsequent steps.
Workflow example |
|---|
|