published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this resource to create and manage NRQL alert conditions in New Relic.
NRQL
The nrql block supports the following arguments:
query- (Required) The NRQL query to execute for the condition.evaluation_offset- (Optional) DEPRECATED: Useaggregation_methodinstead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on theiraggregation_windowsize. The start time depends on this value. It’s recommended to set this to 3 windows. An offset of less than 3 windows will trigger violations sooner, but you may see more false positives and negatives due to data latency. Withevaluation_offsetset to 3 windows and anaggregation_windowof 60 seconds, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago.evaluation_offsetcannot be set withaggregation_method,aggregation_delay, oraggregation_timer.since_value- (Optional) DEPRECATED: Useaggregation_methodinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive).
Terms
NOTE: The direct use of the
termhas been deprecated, and users should usecriticalandwarninginstead. What follows now applies to the named priority attributes forcriticalandwarning, but for those attributes the priority is not allowed.
NRQL alert conditions support up to two terms. At least one term must have priority set to critical and the second optional term must have priority set to warning.
The term block supports the following arguments:
operator- (Optional) Valid values areabove,above_or_equals,below,below_or_equals,equals, ornot_equals(case insensitive). Defaults toequals. Note that when using atypeofbaseline, the only valid option here isabove.priority- (Optional)criticalorwarning. Defaults tocritical.threshold- (Required) The value which will trigger a violation.
For baseline NRQL alert conditions, the value must be in the range [1, 1000]. The value is the number of standard deviations from the baseline that the metric must exceed in order to create a violation.threshold_duration- (Optional) The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of theaggregation_window(which has a default of 60 seconds).
For baseline NRQL alert conditions, the value must be within 120-3600 seconds (inclusive).
For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive).
For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive).threshold_occurrences- (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorat_least_once(case insensitive).duration- (Optional) DEPRECATED: Usethreshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive).time_function- (Optional) DEPRECATED: Usethreshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
Additional Examples
Type: baseline
Baseline NRQL alert conditions are dynamic in nature and adjust to the behavior of your data. The example below demonstrates a baseline NRQL alert condition for alerting when transaction durations are above a specified threshold and dynamically adjusts based on data trends.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooIndex_alertPolicyAlertPolicy = new newrelic.AlertPolicy("fooIndex/alertPolicyAlertPolicy", {});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("fooNrqlAlertCondition", {
accountId: "your_account_id",
policyId: fooAlertPolicy.id,
type: "static",
description: "Alert when transactions are taking too long",
runbookUrl: "https://www.example.com",
enabled: true,
violationTimeLimitSeconds: 3600,
fillOption: "static",
fillValue: 1,
aggregationWindow: 60,
aggregationMethod: "event_flow",
aggregationDelay: "120",
expirationDuration: 120,
openViolationOnExpiration: true,
closeViolationsOnExpiration: true,
slideBy: 30,
nrql: {
query: "SELECT average(duration) FROM Transaction where appName = 'Your App'",
},
critical: {
operator: "above",
threshold: 5.5,
thresholdDuration: 300,
thresholdOccurrences: "ALL",
},
warning: {
operator: "above",
threshold: 3.5,
thresholdDuration: 600,
thresholdOccurrences: "ALL",
},
});
import pulumi
import pulumi_newrelic as newrelic
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_index_alert_policy_alert_policy = newrelic.AlertPolicy("fooIndex/alertPolicyAlertPolicy")
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
account_id="your_account_id",
policy_id=foo_alert_policy.id,
type="static",
description="Alert when transactions are taking too long",
runbook_url="https://www.example.com",
enabled=True,
violation_time_limit_seconds=3600,
fill_option="static",
fill_value=1,
aggregation_window=60,
aggregation_method="event_flow",
aggregation_delay="120",
expiration_duration=120,
open_violation_on_expiration=True,
close_violations_on_expiration=True,
slide_by=30,
nrql=newrelic.NrqlAlertConditionNrqlArgs(
query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
),
critical=newrelic.NrqlAlertConditionCriticalArgs(
operator="above",
threshold=5.5,
threshold_duration=300,
threshold_occurrences="ALL",
),
warning=newrelic.NrqlAlertConditionWarningArgs(
operator="above",
threshold=3.5,
threshold_duration=600,
threshold_occurrences="ALL",
))
using System.Collections.Generic;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var fooAlertPolicy = new NewRelic.AlertPolicy("fooAlertPolicy");
var fooIndex_alertPolicyAlertPolicy = new NewRelic.AlertPolicy("fooIndex/alertPolicyAlertPolicy");
var fooNrqlAlertCondition = new NewRelic.NrqlAlertCondition("fooNrqlAlertCondition", new()
{
AccountId = "your_account_id",
PolicyId = fooAlertPolicy.Id,
Type = "static",
Description = "Alert when transactions are taking too long",
RunbookUrl = "https://www.example.com",
Enabled = true,
ViolationTimeLimitSeconds = 3600,
FillOption = "static",
FillValue = 1,
AggregationWindow = 60,
AggregationMethod = "event_flow",
AggregationDelay = "120",
ExpirationDuration = 120,
OpenViolationOnExpiration = true,
CloseViolationsOnExpiration = true,
SlideBy = 30,
Nrql = new NewRelic.Inputs.NrqlAlertConditionNrqlArgs
{
Query = "SELECT average(duration) FROM Transaction where appName = 'Your App'",
},
Critical = new NewRelic.Inputs.NrqlAlertConditionCriticalArgs
{
Operator = "above",
Threshold = 5.5,
ThresholdDuration = 300,
ThresholdOccurrences = "ALL",
},
Warning = new NewRelic.Inputs.NrqlAlertConditionWarningArgs
{
Operator = "above",
Threshold = 3.5,
ThresholdDuration = 600,
ThresholdOccurrences = "ALL",
},
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooAlertPolicy, err := newrelic.NewAlertPolicy(ctx, "fooAlertPolicy", nil)
if err != nil {
return err
}
_, err = newrelic.NewAlertPolicy(ctx, "fooIndex/alertPolicyAlertPolicy", nil)
if err != nil {
return err
}
_, err = newrelic.NewNrqlAlertCondition(ctx, "fooNrqlAlertCondition", &newrelic.NrqlAlertConditionArgs{
AccountId: pulumi.Int("your_account_id"),
PolicyId: fooAlertPolicy.ID(),
Type: pulumi.String("static"),
Description: pulumi.String("Alert when transactions are taking too long"),
RunbookUrl: pulumi.String("https://www.example.com"),
Enabled: pulumi.Bool(true),
ViolationTimeLimitSeconds: pulumi.Int(3600),
FillOption: pulumi.String("static"),
FillValue: pulumi.Float64(1),
AggregationWindow: pulumi.Int(60),
AggregationMethod: pulumi.String("event_flow"),
AggregationDelay: pulumi.String("120"),
ExpirationDuration: pulumi.Int(120),
OpenViolationOnExpiration: pulumi.Bool(true),
CloseViolationsOnExpiration: pulumi.Bool(true),
SlideBy: pulumi.Int(30),
Nrql: &NrqlAlertConditionNrqlArgs{
Query: pulumi.String("SELECT average(duration) FROM Transaction where appName = 'Your App'"),
},
Critical: &NrqlAlertConditionCriticalArgs{
Operator: pulumi.String("above"),
Threshold: pulumi.Float64(5.5),
ThresholdDuration: pulumi.Int(300),
ThresholdOccurrences: pulumi.String("ALL"),
},
Warning: &NrqlAlertConditionWarningArgs{
Operator: pulumi.String("above"),
Threshold: pulumi.Float64(3.5),
ThresholdDuration: pulumi.Int(600),
ThresholdOccurrences: pulumi.String("ALL"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.NrqlAlertCondition;
import com.pulumi.newrelic.NrqlAlertConditionArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionNrqlArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionCriticalArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionWarningArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooIndex_alertPolicyAlertPolicy = new AlertPolicy("fooIndex/alertPolicyAlertPolicy");
var fooNrqlAlertCondition = new NrqlAlertCondition("fooNrqlAlertCondition", NrqlAlertConditionArgs.builder()
.accountId("your_account_id")
.policyId(fooAlertPolicy.id())
.type("static")
.description("Alert when transactions are taking too long")
.runbookUrl("https://www.example.com")
.enabled(true)
.violationTimeLimitSeconds(3600)
.fillOption("static")
.fillValue(1)
.aggregationWindow(60)
.aggregationMethod("event_flow")
.aggregationDelay(120)
.expirationDuration(120)
.openViolationOnExpiration(true)
.closeViolationsOnExpiration(true)
.slideBy(30)
.nrql(NrqlAlertConditionNrqlArgs.builder()
.query("SELECT average(duration) FROM Transaction where appName = 'Your App'")
.build())
.critical(NrqlAlertConditionCriticalArgs.builder()
.operator("above")
.threshold(5.5)
.thresholdDuration(300)
.thresholdOccurrences("ALL")
.build())
.warning(NrqlAlertConditionWarningArgs.builder()
.operator("above")
.threshold(3.5)
.thresholdDuration(600)
.thresholdOccurrences("ALL")
.build())
.build());
}
}
resources:
fooAlertPolicy:
type: newrelic:AlertPolicy
fooIndex/alertPolicyAlertPolicy:
type: newrelic:AlertPolicy
fooNrqlAlertCondition:
type: newrelic:NrqlAlertCondition
properties:
accountId: your_account_id
policyId: ${fooAlertPolicy.id}
type: static
description: Alert when transactions are taking too long
runbookUrl: https://www.example.com
enabled: true
violationTimeLimitSeconds: 3600
fillOption: static
fillValue: 1
aggregationWindow: 60
aggregationMethod: event_flow
aggregationDelay: 120
expirationDuration: 120
openViolationOnExpiration: true
closeViolationsOnExpiration: true
slideBy: 30
nrql:
query: SELECT average(duration) FROM Transaction where appName = 'Your App'
critical:
operator: above
threshold: 5.5
thresholdDuration: 300
thresholdOccurrences: ALL
warning:
operator: above
threshold: 3.5
thresholdDuration: 600
thresholdOccurrences: ALL
«««< HEAD
Type: outlier
In software development and operations, it is common to have a group consisting of members you expect to behave approximately the same. Outlier detection facilitates alerting when the behavior of one or more common members falls outside a specified range expectation.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.NrqlAlertCondition;
import com.pulumi.newrelic.NrqlAlertConditionArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionNrqlArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionCriticalArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionWarningArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooNrqlAlertCondition = new NrqlAlertCondition("fooNrqlAlertCondition", NrqlAlertConditionArgs.builder()
.type("outlier")
.accountId("your_account_id")
.policyId(fooAlertPolicy.id())
.description("Alert when outlier conditions occur")
.enabled(true)
.runbookUrl("https://www.example.com")
.violationTimeLimitSeconds(3600)
.aggregationMethod("event_flow")
.aggregationDelay(120)
.expectedGroups(2)
.openViolationOnGroupOverlap(true)
.nrql(NrqlAlertConditionNrqlArgs.builder()
.query("SELECT percentile(duration, 95) FROM Transaction WHERE appName = 'ExampleAppName' FACET host")
.build())
.critical(NrqlAlertConditionCriticalArgs.builder()
.operator("above")
.threshold(0.002)
.thresholdDuration(600)
.thresholdOccurrences("all")
.build())
.warning(NrqlAlertConditionWarningArgs.builder()
.operator("above")
.threshold(0.0015)
.thresholdDuration(600)
.thresholdOccurrences("all")
.build())
.build());
}
}
resources:
fooAlertPolicy:
type: newrelic:AlertPolicy
fooNrqlAlertCondition:
type: newrelic:NrqlAlertCondition
properties:
type: outlier
accountId: your_account_id
policyId: ${fooAlertPolicy.id}
description: Alert when outlier conditions occur
enabled: true
runbookUrl: https://www.example.com
violationTimeLimitSeconds: 3600
aggregationMethod: event_flow
aggregationDelay: 120
# Outlier only
expectedGroups: 2
# Outlier only
openViolationOnGroupOverlap: true
nrql:
query: SELECT percentile(duration, 95) FROM Transaction WHERE appName = 'ExampleAppName' FACET host
critical:
operator: above
threshold: 0.002
thresholdDuration: 600
thresholdOccurrences: all
warning:
operator: above
threshold: 0.0015
thresholdDuration: 600
thresholdOccurrences: all
Upgrade from 1.x to 2.x
There have been several deprecations in the newrelic.NrqlAlertCondition
resource. Users will need to make some updates in order to have a smooth
upgrade.
An example resource from 1.x might look like the following.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const nrqlAlertCondition = new newrelic.NrqlAlertCondition("nrqlAlertCondition", {
policyId: newrelic_alert_policy.z.id,
type: "static",
runbookUrl: "https://localhost",
enabled: true,
valueFunction: "sum",
violationTimeLimit: "TWENTY_FOUR_HOURS",
critical: {
operator: "above",
thresholdDuration: 120,
threshold: 3,
thresholdOccurrences: "AT_LEAST_ONCE",
},
nrql: {
query: `SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName`,
},
});
import pulumi
import pulumi_newrelic as newrelic
nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
policy_id=newrelic_alert_policy["z"]["id"],
type="static",
runbook_url="https://localhost",
enabled=True,
value_function="sum",
violation_time_limit="TWENTY_FOUR_HOURS",
critical=newrelic.NrqlAlertConditionCriticalArgs(
operator="above",
threshold_duration=120,
threshold=3,
threshold_occurrences="AT_LEAST_ONCE",
),
nrql=newrelic.NrqlAlertConditionNrqlArgs(
query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
))
using System.Collections.Generic;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var nrqlAlertCondition = new NewRelic.NrqlAlertCondition("nrqlAlertCondition", new()
{
PolicyId = newrelic_alert_policy.Z.Id,
Type = "static",
RunbookUrl = "https://localhost",
Enabled = true,
ValueFunction = "sum",
ViolationTimeLimit = "TWENTY_FOUR_HOURS",
Critical = new NewRelic.Inputs.NrqlAlertConditionCriticalArgs
{
Operator = "above",
ThresholdDuration = 120,
Threshold = 3,
ThresholdOccurrences = "AT_LEAST_ONCE",
},
Nrql = new NewRelic.Inputs.NrqlAlertConditionNrqlArgs
{
Query = "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNrqlAlertCondition(ctx, "nrqlAlertCondition", &newrelic.NrqlAlertConditionArgs{
PolicyId: pulumi.Any(newrelic_alert_policy.Z.Id),
Type: pulumi.String("static"),
RunbookUrl: pulumi.String("https://localhost"),
Enabled: pulumi.Bool(true),
ValueFunction: pulumi.String("sum"),
ViolationTimeLimit: pulumi.String("TWENTY_FOUR_HOURS"),
Critical: &NrqlAlertConditionCriticalArgs{
Operator: pulumi.String("above"),
ThresholdDuration: pulumi.Int(120),
Threshold: pulumi.Float64(3),
ThresholdOccurrences: pulumi.String("AT_LEAST_ONCE"),
},
Nrql: &NrqlAlertConditionNrqlArgs{
Query: pulumi.String(fmt.Sprintf("SELECT count(*) FROM TransactionError WHERE appName like '%vDummy App%v' FACET appName", "%", "%")),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NrqlAlertCondition;
import com.pulumi.newrelic.NrqlAlertConditionArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionCriticalArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionNrqlArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var nrqlAlertCondition = new NrqlAlertCondition("nrqlAlertCondition", NrqlAlertConditionArgs.builder()
.policyId(newrelic_alert_policy.z().id())
.type("static")
.runbookUrl("https://localhost")
.enabled(true)
.valueFunction("sum")
.violationTimeLimit("TWENTY_FOUR_HOURS")
.critical(NrqlAlertConditionCriticalArgs.builder()
.operator("above")
.thresholdDuration(120)
.threshold(3)
.thresholdOccurrences("AT_LEAST_ONCE")
.build())
.nrql(NrqlAlertConditionNrqlArgs.builder()
.query("SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName")
.build())
.build());
}
}
resources:
nrqlAlertCondition:
type: newrelic:NrqlAlertCondition
properties:
policyId: ${newrelic_alert_policy.z.id}
type: static
runbookUrl: https://localhost
enabled: true
valueFunction: sum
violationTimeLimit: TWENTY_FOUR_HOURS
critical:
operator: above
thresholdDuration: 120
threshold: 3
thresholdOccurrences: AT_LEAST_ONCE
nrql:
query: SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName
After making the appropriate adjustments mentioned in the deprecation warnings, the resource now looks like the following.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const nrqlAlertCondition = new newrelic.NrqlAlertCondition("nrqlAlertCondition", {
policyId: newrelic_alert_policy.z.id,
type: "static",
runbookUrl: "https://localhost",
enabled: true,
valueFunction: "sum",
violationTimeLimitSeconds: 86400,
terms: [{
priority: "critical",
operator: "above",
threshold: 3,
duration: 5,
timeFunction: "any",
}],
nrql: {
query: `SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName`,
},
});
import pulumi
import pulumi_newrelic as newrelic
nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
policy_id=newrelic_alert_policy["z"]["id"],
type="static",
runbook_url="https://localhost",
enabled=True,
value_function="sum",
violation_time_limit_seconds=86400,
terms=[newrelic.NrqlAlertConditionTermArgs(
priority="critical",
operator="above",
threshold=3,
duration=5,
time_function="any",
)],
nrql=newrelic.NrqlAlertConditionNrqlArgs(
query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
))
using System.Collections.Generic;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var nrqlAlertCondition = new NewRelic.NrqlAlertCondition("nrqlAlertCondition", new()
{
PolicyId = newrelic_alert_policy.Z.Id,
Type = "static",
RunbookUrl = "https://localhost",
Enabled = true,
ValueFunction = "sum",
ViolationTimeLimitSeconds = 86400,
Terms = new[]
{
new NewRelic.Inputs.NrqlAlertConditionTermArgs
{
Priority = "critical",
Operator = "above",
Threshold = 3,
Duration = 5,
TimeFunction = "any",
},
},
Nrql = new NewRelic.Inputs.NrqlAlertConditionNrqlArgs
{
Query = "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := newrelic.NewNrqlAlertCondition(ctx, "nrqlAlertCondition", &newrelic.NrqlAlertConditionArgs{
PolicyId: pulumi.Any(newrelic_alert_policy.Z.Id),
Type: pulumi.String("static"),
RunbookUrl: pulumi.String("https://localhost"),
Enabled: pulumi.Bool(true),
ValueFunction: pulumi.String("sum"),
ViolationTimeLimitSeconds: pulumi.Int(86400),
Terms: NrqlAlertConditionTermArray{
&NrqlAlertConditionTermArgs{
Priority: pulumi.String("critical"),
Operator: pulumi.String("above"),
Threshold: pulumi.Float64(3),
Duration: pulumi.Int(5),
TimeFunction: pulumi.String("any"),
},
},
Nrql: &NrqlAlertConditionNrqlArgs{
Query: pulumi.String(fmt.Sprintf("SELECT count(*) FROM TransactionError WHERE appName like '%vDummy App%v' FACET appName", "%", "%")),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NrqlAlertCondition;
import com.pulumi.newrelic.NrqlAlertConditionArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionTermArgs;
import com.pulumi.newrelic.inputs.NrqlAlertConditionNrqlArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var nrqlAlertCondition = new NrqlAlertCondition("nrqlAlertCondition", NrqlAlertConditionArgs.builder()
.policyId(newrelic_alert_policy.z().id())
.type("static")
.runbookUrl("https://localhost")
.enabled(true)
.valueFunction("sum")
.violationTimeLimitSeconds(86400)
.terms(NrqlAlertConditionTermArgs.builder()
.priority("critical")
.operator("above")
.threshold(3)
.duration(5)
.timeFunction("any")
.build())
.nrql(NrqlAlertConditionNrqlArgs.builder()
.query("SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName")
.build())
.build());
}
}
resources:
nrqlAlertCondition:
type: newrelic:NrqlAlertCondition
properties:
policyId: ${newrelic_alert_policy.z.id}
type: static
runbookUrl: https://localhost
enabled: true
valueFunction: sum
violationTimeLimitSeconds: 86400
terms:
- priority: critical
operator: above
threshold: 3
duration: 5
timeFunction: any
nrql:
query: SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName
Create NrqlAlertCondition Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NrqlAlertCondition(name: string, args: NrqlAlertConditionArgs, opts?: CustomResourceOptions);@overload
def NrqlAlertCondition(resource_name: str,
args: NrqlAlertConditionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NrqlAlertCondition(resource_name: str,
opts: Optional[ResourceOptions] = None,
nrql: Optional[NrqlAlertConditionNrqlArgs] = None,
policy_id: Optional[int] = None,
fill_value: Optional[float] = None,
expiration_duration: Optional[int] = None,
aggregation_window: Optional[int] = None,
baseline_direction: Optional[str] = None,
close_violations_on_expiration: Optional[bool] = None,
critical: Optional[NrqlAlertConditionCriticalArgs] = None,
description: Optional[str] = None,
aggregation_method: Optional[str] = None,
name: Optional[str] = None,
fill_option: Optional[str] = None,
aggregation_timer: Optional[str] = None,
account_id: Optional[int] = None,
enabled: Optional[bool] = None,
open_violation_on_expiration: Optional[bool] = None,
aggregation_delay: Optional[str] = None,
runbook_url: Optional[str] = None,
slide_by: Optional[int] = None,
terms: Optional[Sequence[NrqlAlertConditionTermArgs]] = None,
type: Optional[str] = None,
value_function: Optional[str] = None,
violation_time_limit: Optional[str] = None,
violation_time_limit_seconds: Optional[int] = None,
warning: Optional[NrqlAlertConditionWarningArgs] = None)func NewNrqlAlertCondition(ctx *Context, name string, args NrqlAlertConditionArgs, opts ...ResourceOption) (*NrqlAlertCondition, error)public NrqlAlertCondition(string name, NrqlAlertConditionArgs args, CustomResourceOptions? opts = null)
public NrqlAlertCondition(String name, NrqlAlertConditionArgs args)
public NrqlAlertCondition(String name, NrqlAlertConditionArgs args, CustomResourceOptions options)
type: newrelic:NrqlAlertCondition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NrqlAlertConditionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NrqlAlertConditionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NrqlAlertConditionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NrqlAlertConditionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NrqlAlertConditionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var nrqlAlertConditionResource = new NewRelic.NrqlAlertCondition("nrqlAlertConditionResource", new()
{
Nrql = new NewRelic.Inputs.NrqlAlertConditionNrqlArgs
{
Query = "string",
},
PolicyId = 0,
FillValue = 0,
ExpirationDuration = 0,
AggregationWindow = 0,
BaselineDirection = "string",
CloseViolationsOnExpiration = false,
Critical = new NewRelic.Inputs.NrqlAlertConditionCriticalArgs
{
Threshold = 0,
Operator = "string",
ThresholdDuration = 0,
ThresholdOccurrences = "string",
},
Description = "string",
AggregationMethod = "string",
Name = "string",
FillOption = "string",
AggregationTimer = "string",
AccountId = 0,
Enabled = false,
OpenViolationOnExpiration = false,
AggregationDelay = "string",
RunbookUrl = "string",
SlideBy = 0,
Type = "string",
ViolationTimeLimitSeconds = 0,
Warning = new NewRelic.Inputs.NrqlAlertConditionWarningArgs
{
Threshold = 0,
Operator = "string",
ThresholdDuration = 0,
ThresholdOccurrences = "string",
},
});
example, err := newrelic.NewNrqlAlertCondition(ctx, "nrqlAlertConditionResource", &newrelic.NrqlAlertConditionArgs{
Nrql: &newrelic.NrqlAlertConditionNrqlArgs{
Query: pulumi.String("string"),
},
PolicyId: pulumi.Int(0),
FillValue: pulumi.Float64(0),
ExpirationDuration: pulumi.Int(0),
AggregationWindow: pulumi.Int(0),
BaselineDirection: pulumi.String("string"),
CloseViolationsOnExpiration: pulumi.Bool(false),
Critical: &newrelic.NrqlAlertConditionCriticalArgs{
Threshold: pulumi.Float64(0),
Operator: pulumi.String("string"),
ThresholdDuration: pulumi.Int(0),
ThresholdOccurrences: pulumi.String("string"),
},
Description: pulumi.String("string"),
AggregationMethod: pulumi.String("string"),
Name: pulumi.String("string"),
FillOption: pulumi.String("string"),
AggregationTimer: pulumi.String("string"),
AccountId: pulumi.Int(0),
Enabled: pulumi.Bool(false),
OpenViolationOnExpiration: pulumi.Bool(false),
AggregationDelay: pulumi.String("string"),
RunbookUrl: pulumi.String("string"),
SlideBy: pulumi.Int(0),
Type: pulumi.String("string"),
ViolationTimeLimitSeconds: pulumi.Int(0),
Warning: &newrelic.NrqlAlertConditionWarningArgs{
Threshold: pulumi.Float64(0),
Operator: pulumi.String("string"),
ThresholdDuration: pulumi.Int(0),
ThresholdOccurrences: pulumi.String("string"),
},
})
var nrqlAlertConditionResource = new NrqlAlertCondition("nrqlAlertConditionResource", NrqlAlertConditionArgs.builder()
.nrql(NrqlAlertConditionNrqlArgs.builder()
.query("string")
.build())
.policyId(0)
.fillValue(0.0)
.expirationDuration(0)
.aggregationWindow(0)
.baselineDirection("string")
.closeViolationsOnExpiration(false)
.critical(NrqlAlertConditionCriticalArgs.builder()
.threshold(0.0)
.operator("string")
.thresholdDuration(0)
.thresholdOccurrences("string")
.build())
.description("string")
.aggregationMethod("string")
.name("string")
.fillOption("string")
.aggregationTimer("string")
.accountId(0)
.enabled(false)
.openViolationOnExpiration(false)
.aggregationDelay("string")
.runbookUrl("string")
.slideBy(0)
.type("string")
.violationTimeLimitSeconds(0)
.warning(NrqlAlertConditionWarningArgs.builder()
.threshold(0.0)
.operator("string")
.thresholdDuration(0)
.thresholdOccurrences("string")
.build())
.build());
nrql_alert_condition_resource = newrelic.NrqlAlertCondition("nrqlAlertConditionResource",
nrql={
"query": "string",
},
policy_id=0,
fill_value=0,
expiration_duration=0,
aggregation_window=0,
baseline_direction="string",
close_violations_on_expiration=False,
critical={
"threshold": 0,
"operator": "string",
"threshold_duration": 0,
"threshold_occurrences": "string",
},
description="string",
aggregation_method="string",
name="string",
fill_option="string",
aggregation_timer="string",
account_id=0,
enabled=False,
open_violation_on_expiration=False,
aggregation_delay="string",
runbook_url="string",
slide_by=0,
type="string",
violation_time_limit_seconds=0,
warning={
"threshold": 0,
"operator": "string",
"threshold_duration": 0,
"threshold_occurrences": "string",
})
const nrqlAlertConditionResource = new newrelic.NrqlAlertCondition("nrqlAlertConditionResource", {
nrql: {
query: "string",
},
policyId: 0,
fillValue: 0,
expirationDuration: 0,
aggregationWindow: 0,
baselineDirection: "string",
closeViolationsOnExpiration: false,
critical: {
threshold: 0,
operator: "string",
thresholdDuration: 0,
thresholdOccurrences: "string",
},
description: "string",
aggregationMethod: "string",
name: "string",
fillOption: "string",
aggregationTimer: "string",
accountId: 0,
enabled: false,
openViolationOnExpiration: false,
aggregationDelay: "string",
runbookUrl: "string",
slideBy: 0,
type: "string",
violationTimeLimitSeconds: 0,
warning: {
threshold: 0,
operator: "string",
thresholdDuration: 0,
thresholdOccurrences: "string",
},
});
type: newrelic:NrqlAlertCondition
properties:
accountId: 0
aggregationDelay: string
aggregationMethod: string
aggregationTimer: string
aggregationWindow: 0
baselineDirection: string
closeViolationsOnExpiration: false
critical:
operator: string
threshold: 0
thresholdDuration: 0
thresholdOccurrences: string
description: string
enabled: false
expirationDuration: 0
fillOption: string
fillValue: 0
name: string
nrql:
query: string
openViolationOnExpiration: false
policyId: 0
runbookUrl: string
slideBy: 0
type: string
violationTimeLimitSeconds: 0
warning:
operator: string
threshold: 0
thresholdDuration: 0
thresholdOccurrences: string
NrqlAlertCondition Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NrqlAlertCondition resource accepts the following input properties:
- Nrql
Pulumi.
New Relic. Inputs. Nrql Alert Condition Nrql - A NRQL query. See NRQL below for details.
- Policy
Id int - The ID of the policy where this condition should be used.
- Account
Id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - Aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - Aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - Aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - Aggregation
Window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- Baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - Close
Violations boolOn Expiration - Whether to close all open violations when the signal expires.
- Critical
Pulumi.
New Relic. Inputs. Nrql Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - Description string
- The description of the NRQL alert condition.
- Enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - Expiration
Duration int - The amount of time (in seconds) to wait before considering the signal expired.
- Fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - Fill
Value double - This value will be used for filling gaps in the signal.
- Name string
- The title of the condition.
- Open
Violation boolOn Expiration - Whether to create a new violation to capture that the signal expired.
- Runbook
Url string - Runbook URL to display in notifications.
- Slide
By int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - Terms
List<Pulumi.
New Relic. Inputs. Nrql Alert Condition Term> - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - Type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - Value
Function string - Possible values are
single_value,sum(case insensitive). - Violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Violation
Time intLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Warning
Pulumi.
New Relic. Inputs. Nrql Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- Nrql
Nrql
Alert Condition Nrql Args - A NRQL query. See NRQL below for details.
- Policy
Id int - The ID of the policy where this condition should be used.
- Account
Id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - Aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - Aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - Aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - Aggregation
Window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- Baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - Close
Violations boolOn Expiration - Whether to close all open violations when the signal expires.
- Critical
Nrql
Alert Condition Critical Args - A list containing the
criticalthreshold values. See Terms below for details. - Description string
- The description of the NRQL alert condition.
- Enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - Expiration
Duration int - The amount of time (in seconds) to wait before considering the signal expired.
- Fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - Fill
Value float64 - This value will be used for filling gaps in the signal.
- Name string
- The title of the condition.
- Open
Violation boolOn Expiration - Whether to create a new violation to capture that the signal expired.
- Runbook
Url string - Runbook URL to display in notifications.
- Slide
By int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - Terms
[]Nrql
Alert Condition Term Args - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - Type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - Value
Function string - Possible values are
single_value,sum(case insensitive). - Violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Violation
Time intLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Warning
Nrql
Alert Condition Warning Args - A list containing the
warningthreshold values. See Terms below for details.
- nrql
Nrql
Alert Condition Nrql - A NRQL query. See NRQL below for details.
- policy
Id Integer - The ID of the policy where this condition should be used.
- account
Id Integer - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay String - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method String - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer String - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window Integer - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction String - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations BooleanOn Expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - description String
- The description of the NRQL alert condition.
- enabled Boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - expiration
Duration Integer - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option String - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value Double - This value will be used for filling gaps in the signal.
- name String
- The title of the condition.
- open
Violation BooleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- runbook
Url String - Runbook URL to display in notifications.
- slide
By Integer - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
List<Nrql
Alert Condition Term> - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type String
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function String - Possible values are
single_value,sum(case insensitive). - violation
Time StringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time IntegerLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- nrql
Nrql
Alert Condition Nrql - A NRQL query. See NRQL below for details.
- policy
Id number - The ID of the policy where this condition should be used.
- account
Id number - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window number - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations booleanOn Expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - description string
- The description of the NRQL alert condition.
- enabled boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - expiration
Duration number - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value number - This value will be used for filling gaps in the signal.
- name string
- The title of the condition.
- open
Violation booleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- runbook
Url string - Runbook URL to display in notifications.
- slide
By number - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
Nrql
Alert Condition Term[] - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function string - Possible values are
single_value,sum(case insensitive). - violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time numberLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- nrql
Nrql
Alert Condition Nrql Args - A NRQL query. See NRQL below for details.
- policy_
id int - The ID of the policy where this condition should be used.
- account_
id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation_
delay str - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation_
method str - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation_
timer str - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation_
window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline_
direction str - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close_
violations_ boolon_ expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical Args - A list containing the
criticalthreshold values. See Terms below for details. - description str
- The description of the NRQL alert condition.
- enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - expiration_
duration int - The amount of time (in seconds) to wait before considering the signal expired.
- fill_
option str - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill_
value float - This value will be used for filling gaps in the signal.
- name str
- The title of the condition.
- open_
violation_ boolon_ expiration - Whether to create a new violation to capture that the signal expired.
- runbook_
url str - Runbook URL to display in notifications.
- slide_
by int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
Sequence[Nrql
Alert Condition Term Args] - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type str
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value_
function str - Possible values are
single_value,sum(case insensitive). - violation_
time_ strlimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation_
time_ intlimit_ seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning Args - A list containing the
warningthreshold values. See Terms below for details.
- nrql Property Map
- A NRQL query. See NRQL below for details.
- policy
Id Number - The ID of the policy where this condition should be used.
- account
Id Number - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay String - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method String - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer String - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window Number - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction String - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations BooleanOn Expiration - Whether to close all open violations when the signal expires.
- critical Property Map
- A list containing the
criticalthreshold values. See Terms below for details. - description String
- The description of the NRQL alert condition.
- enabled Boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - expiration
Duration Number - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option String - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value Number - This value will be used for filling gaps in the signal.
- name String
- The title of the condition.
- open
Violation BooleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- runbook
Url String - Runbook URL to display in notifications.
- slide
By Number - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms List<Property Map>
- DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type String
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function String - Possible values are
single_value,sum(case insensitive). - violation
Time StringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time NumberLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning Property Map
- A list containing the
warningthreshold values. See Terms below for details.
Outputs
All input properties are implicitly available as output properties. Additionally, the NrqlAlertCondition resource produces the following output properties:
- Entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- entity
Guid String - The unique entity identifier of the NRQL Condition in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
- entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- id string
- The provider-assigned unique ID for this managed resource.
- entity_
guid str - The unique entity identifier of the NRQL Condition in New Relic.
- id str
- The provider-assigned unique ID for this managed resource.
- entity
Guid String - The unique entity identifier of the NRQL Condition in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NrqlAlertCondition Resource
Get an existing NrqlAlertCondition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NrqlAlertConditionState, opts?: CustomResourceOptions): NrqlAlertCondition@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[int] = None,
aggregation_delay: Optional[str] = None,
aggregation_method: Optional[str] = None,
aggregation_timer: Optional[str] = None,
aggregation_window: Optional[int] = None,
baseline_direction: Optional[str] = None,
close_violations_on_expiration: Optional[bool] = None,
critical: Optional[NrqlAlertConditionCriticalArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
entity_guid: Optional[str] = None,
expiration_duration: Optional[int] = None,
fill_option: Optional[str] = None,
fill_value: Optional[float] = None,
name: Optional[str] = None,
nrql: Optional[NrqlAlertConditionNrqlArgs] = None,
open_violation_on_expiration: Optional[bool] = None,
policy_id: Optional[int] = None,
runbook_url: Optional[str] = None,
slide_by: Optional[int] = None,
terms: Optional[Sequence[NrqlAlertConditionTermArgs]] = None,
type: Optional[str] = None,
value_function: Optional[str] = None,
violation_time_limit: Optional[str] = None,
violation_time_limit_seconds: Optional[int] = None,
warning: Optional[NrqlAlertConditionWarningArgs] = None) -> NrqlAlertConditionfunc GetNrqlAlertCondition(ctx *Context, name string, id IDInput, state *NrqlAlertConditionState, opts ...ResourceOption) (*NrqlAlertCondition, error)public static NrqlAlertCondition Get(string name, Input<string> id, NrqlAlertConditionState? state, CustomResourceOptions? opts = null)public static NrqlAlertCondition get(String name, Output<String> id, NrqlAlertConditionState state, CustomResourceOptions options)resources: _: type: newrelic:NrqlAlertCondition get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - Aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - Aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - Aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - Aggregation
Window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- Baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - Close
Violations boolOn Expiration - Whether to close all open violations when the signal expires.
- Critical
Pulumi.
New Relic. Inputs. Nrql Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - Description string
- The description of the NRQL alert condition.
- Enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - Entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- Expiration
Duration int - The amount of time (in seconds) to wait before considering the signal expired.
- Fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - Fill
Value double - This value will be used for filling gaps in the signal.
- Name string
- The title of the condition.
- Nrql
Pulumi.
New Relic. Inputs. Nrql Alert Condition Nrql - A NRQL query. See NRQL below for details.
- Open
Violation boolOn Expiration - Whether to create a new violation to capture that the signal expired.
- Policy
Id int - The ID of the policy where this condition should be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Slide
By int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - Terms
List<Pulumi.
New Relic. Inputs. Nrql Alert Condition Term> - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - Type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - Value
Function string - Possible values are
single_value,sum(case insensitive). - Violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Violation
Time intLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Warning
Pulumi.
New Relic. Inputs. Nrql Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- Account
Id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - Aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - Aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - Aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - Aggregation
Window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- Baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - Close
Violations boolOn Expiration - Whether to close all open violations when the signal expires.
- Critical
Nrql
Alert Condition Critical Args - A list containing the
criticalthreshold values. See Terms below for details. - Description string
- The description of the NRQL alert condition.
- Enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - Entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- Expiration
Duration int - The amount of time (in seconds) to wait before considering the signal expired.
- Fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - Fill
Value float64 - This value will be used for filling gaps in the signal.
- Name string
- The title of the condition.
- Nrql
Nrql
Alert Condition Nrql Args - A NRQL query. See NRQL below for details.
- Open
Violation boolOn Expiration - Whether to create a new violation to capture that the signal expired.
- Policy
Id int - The ID of the policy where this condition should be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Slide
By int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - Terms
[]Nrql
Alert Condition Term Args - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - Type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - Value
Function string - Possible values are
single_value,sum(case insensitive). - Violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Violation
Time intLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - Warning
Nrql
Alert Condition Warning Args - A list containing the
warningthreshold values. See Terms below for details.
- account
Id Integer - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay String - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method String - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer String - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window Integer - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction String - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations BooleanOn Expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - description String
- The description of the NRQL alert condition.
- enabled Boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - entity
Guid String - The unique entity identifier of the NRQL Condition in New Relic.
- expiration
Duration Integer - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option String - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value Double - This value will be used for filling gaps in the signal.
- name String
- The title of the condition.
- nrql
Nrql
Alert Condition Nrql - A NRQL query. See NRQL below for details.
- open
Violation BooleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- policy
Id Integer - The ID of the policy where this condition should be used.
- runbook
Url String - Runbook URL to display in notifications.
- slide
By Integer - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
List<Nrql
Alert Condition Term> - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type String
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function String - Possible values are
single_value,sum(case insensitive). - violation
Time StringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time IntegerLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- account
Id number - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay string - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method string - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer string - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window number - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction string - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations booleanOn Expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical - A list containing the
criticalthreshold values. See Terms below for details. - description string
- The description of the NRQL alert condition.
- enabled boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - entity
Guid string - The unique entity identifier of the NRQL Condition in New Relic.
- expiration
Duration number - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option string - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value number - This value will be used for filling gaps in the signal.
- name string
- The title of the condition.
- nrql
Nrql
Alert Condition Nrql - A NRQL query. See NRQL below for details.
- open
Violation booleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- policy
Id number - The ID of the policy where this condition should be used.
- runbook
Url string - Runbook URL to display in notifications.
- slide
By number - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
Nrql
Alert Condition Term[] - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type string
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function string - Possible values are
single_value,sum(case insensitive). - violation
Time stringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time numberLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning - A list containing the
warningthreshold values. See Terms below for details.
- account_
id int - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation_
delay str - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation_
method str - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation_
timer str - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation_
window int - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline_
direction str - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close_
violations_ boolon_ expiration - Whether to close all open violations when the signal expires.
- critical
Nrql
Alert Condition Critical Args - A list containing the
criticalthreshold values. See Terms below for details. - description str
- The description of the NRQL alert condition.
- enabled bool
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - entity_
guid str - The unique entity identifier of the NRQL Condition in New Relic.
- expiration_
duration int - The amount of time (in seconds) to wait before considering the signal expired.
- fill_
option str - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill_
value float - This value will be used for filling gaps in the signal.
- name str
- The title of the condition.
- nrql
Nrql
Alert Condition Nrql Args - A NRQL query. See NRQL below for details.
- open_
violation_ boolon_ expiration - Whether to create a new violation to capture that the signal expired.
- policy_
id int - The ID of the policy where this condition should be used.
- runbook_
url str - Runbook URL to display in notifications.
- slide_
by int - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms
Sequence[Nrql
Alert Condition Term Args] - DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type str
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value_
function str - Possible values are
single_value,sum(case insensitive). - violation_
time_ strlimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation_
time_ intlimit_ seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning
Nrql
Alert Condition Warning Args - A list containing the
warningthreshold values. See Terms below for details.
- account
Id Number - The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable
NEW_RELIC_ACCOUNT_ID. - aggregation
Delay String - How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use
aggregation_delaywith theevent_flowandcadencemethods. The maximum delay is 1200 seconds (20 minutes) when usingevent_flowand 3600 seconds (60 minutes) when usingcadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds.aggregation_delaycannot be set withnrql.evaluation_offset. - aggregation
Method String - Determines when we consider an aggregation window to be complete so that we can evaluate the signal for violations. Possible values are
cadence,event_floworevent_timer. Default isevent_flow.aggregation_methodcannot be set withnrql.evaluation_offset. - aggregation
Timer String - How long we wait after each data point arrives to make sure we've processed the whole batch. Use
aggregation_timerwith theevent_timermethod. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds.aggregation_timercannot be set withnrql.evaluation_offset. - aggregation
Window Number - The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 15 minutes (900 seconds). Default is 60 seconds.
- baseline
Direction String - The baseline direction of a baseline NRQL alert condition. Valid values are:
lower_only,upper_and_lower,upper_only(case insensitive). - close
Violations BooleanOn Expiration - Whether to close all open violations when the signal expires.
- critical Property Map
- A list containing the
criticalthreshold values. See Terms below for details. - description String
- The description of the NRQL alert condition.
- enabled Boolean
- Whether to enable the alert condition. Valid values are
trueandfalse. Defaults totrue. - entity
Guid String - The unique entity identifier of the NRQL Condition in New Relic.
- expiration
Duration Number - The amount of time (in seconds) to wait before considering the signal expired.
- fill
Option String - Which strategy to use when filling gaps in the signal. Possible values are
none,last_valueorstatic. Ifstatic, thefill_valuefield will be used for filling gaps in the signal. - fill
Value Number - This value will be used for filling gaps in the signal.
- name String
- The title of the condition.
- nrql Property Map
- A NRQL query. See NRQL below for details.
- open
Violation BooleanOn Expiration - Whether to create a new violation to capture that the signal expired.
- policy
Id Number - The ID of the policy where this condition should be used.
- runbook
Url String - Runbook URL to display in notifications.
- slide
By Number - Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The
slide_byvalue is specified in seconds and must be smaller than and a factor of theaggregation_window.slide_bycannot be used withstaticNRQL conditions using thesumvalue_function. - terms List<Property Map>
- DEPRECATED Use
critical, andwarninginstead. A list of terms for this condition. See Terms below for details. - type String
- The type of the condition. Valid values are
static,baseline, oroutlier. Defaults tostatic. - value
Function String - Possible values are
single_value,sum(case insensitive). - violation
Time StringLimit - DEPRECATED: Use
violation_time_limit_secondsinstead. Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values areONE_HOUR,TWO_HOURS,FOUR_HOURS,EIGHT_HOURS,TWELVE_HOURS,TWENTY_FOUR_HOURS,THIRTY_DAYS(case insensitive). *Note: One ofviolation_time_limitorviolation_time_limit_secondsmust be set, but not both. - violation
Time NumberLimit Seconds - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). *Note: One of
violation_time_limitorviolation_time_limit_secondsmust be set, but not both. - warning Property Map
- A list containing the
warningthreshold values. See Terms below for details.
Supporting Types
NrqlAlertConditionCritical, NrqlAlertConditionCriticalArgs
- Threshold double
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- Threshold float64
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Double
- The value which will trigger a violation. Must be
0or greater. - duration Integer
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration Integer - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold number
- The value which will trigger a violation. Must be
0or greater. - duration number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold float
- The value which will trigger a violation. Must be
0or greater. - duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator str
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold_
duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold_
occurrences str - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time_
function str - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Number
- The value which will trigger a violation. Must be
0or greater. - duration Number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration Number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
NrqlAlertConditionNrql, NrqlAlertConditionNrqlArgs
- Query string
- The NRQL query to execute for the condition.
- Evaluation
Offset int - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - Since
Value string - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
- Query string
- The NRQL query to execute for the condition.
- Evaluation
Offset int - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - Since
Value string - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
- query String
- The NRQL query to execute for the condition.
- evaluation
Offset Integer - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - since
Value String - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
- query string
- The NRQL query to execute for the condition.
- evaluation
Offset number - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - since
Value string - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
- query str
- The NRQL query to execute for the condition.
- evaluation_
offset int - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - since_
value str - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
- query String
- The NRQL query to execute for the condition.
- evaluation
Offset Number - Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated in one-minute time windows. The start time depends on this value. It's recommended to set this to 3 minutes. An offset of less than 3 minutes will trigger violations sooner, but you may see more false positives and negatives due to data latency. With
evaluation_offsetset to 3 minutes, the NRQL time window applied to your query will be:SINCE 3 minutes ago UNTIL 2 minutes ago. *Note: One ofevaluation_offsetorsince_valuemust be set, but not both. - since
Value String - DEPRECATED: Use
evaluation_offsetinstead. The value to be used in theSINCE <X> minutes agoclause for the NRQL query. Must be between 1-20 (inclusive). *Note: One ofevaluation_offsetorsince_valuemust be set, but not both.
NrqlAlertConditionTerm, NrqlAlertConditionTermArgs
- Threshold double
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Priority string
criticalorwarning. Defaults tocritical.- Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- Threshold float64
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Priority string
criticalorwarning. Defaults tocritical.- Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Double
- The value which will trigger a violation. Must be
0or greater. - duration Integer
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - priority String
criticalorwarning. Defaults tocritical.- threshold
Duration Integer - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold number
- The value which will trigger a violation. Must be
0or greater. - duration number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - priority string
criticalorwarning. Defaults tocritical.- threshold
Duration number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold float
- The value which will trigger a violation. Must be
0or greater. - duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator str
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - priority str
criticalorwarning. Defaults tocritical.- threshold_
duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold_
occurrences str - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time_
function str - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Number
- The value which will trigger a violation. Must be
0or greater. - duration Number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - priority String
criticalorwarning. Defaults tocritical.- threshold
Duration Number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
NrqlAlertConditionWarning, NrqlAlertConditionWarningArgs
- Threshold double
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- Threshold float64
- The value which will trigger a violation. Must be
0or greater. - Duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - Operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - Threshold
Duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - Threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - Time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Double
- The value which will trigger a violation. Must be
0or greater. - duration Integer
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration Integer - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold number
- The value which will trigger a violation. Must be
0or greater. - duration number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator string
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences string - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function string - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold float
- The value which will trigger a violation. Must be
0or greater. - duration int
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator str
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold_
duration int - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold_
occurrences str - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time_
function str - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
- threshold Number
- The value which will trigger a violation. Must be
0or greater. - duration Number
- DEPRECATED: Use
threshold_durationinstead. The duration of time, in minutes, that the threshold must violate for in order to create a violation. Must be within 1-120 (inclusive). - operator String
- Valid values are
above,below, orequals(case insensitive). Defaults toequals. Note that when using atypeofoutlierorbaseline, the only valid option here isabove. - threshold
Duration Number - The duration, in seconds, that the threshold must violate in order to create a violation. Value must be a multiple of the
aggregation_window(which has a default of 60 seconds). For baseline and outlier NRQL alert conditions, the value must be within 120-3600 seconds (inclusive). For static NRQL alert conditions with thesumvalue function, the value must be within 120-7200 seconds (inclusive). For static NRQL alert conditions with thesingle_valuevalue function, the value must be within 60-7200 seconds (inclusive). - threshold
Occurrences String - The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:
allorat_least_once(case insensitive). - time
Function String - DEPRECATED: Use
threshold_occurrencesinstead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are:allorany.
Import
NRQL alert conditions can be imported using a composite ID of <policy_id>:<condition_id>:<conditionType>, e.g. // For baseline conditions
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:baseline
// For static conditions
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
«««< HEAD ======= »»»> v2.46.1 Users can find the actual values for policy_id and condition_id from the New Relic One UI under respective policy and condition.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
