The action identifier is newrelic.alerts.createBaselineNrqlCondition.
Creates a new baseline NRQL alert condition under an alert policy. A baseline condition dynamically predicts a signal's expected range from its historical behavior and opens a violation when the live signal deviates from that predicted baseline by more than the configured 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. |
|
baselineDirection | String | Required. The direction of deviation that triggers a violation. One of |
|
terms | List | Conditionally required. The condition's thresholds expressed as percentage deviation from the baseline. Required unless |
|
nrqlDataAccountId | Int | Optional. Account to run the NRQL query against if different from |
|
signalSeasonality | String | Optional. Seasonal pattern applied to the baseline's prediction model. One of |
|
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. See |
|
expiration | Map | Optional. Loss-of-signal settings. See |
|
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 baseline NRQL condition that alerts when throughput deviates above its expected range.
Workflow example |
|---|
|