1. Packages
  2. Newrelic Provider
  3. API Docs
  4. NrqlAlertCondition
New Relic v5.44.0 published on Saturday, Mar 29, 2025 by Pulumi

newrelic.NrqlAlertCondition

Explore with Pulumi AI

Use this resource to create and manage NRQL alert conditions in New Relic.

Example Usage

Type: static (default)

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.AlertPolicy("foo", {name: "foo"});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("foo", {
    accountId: "12345678",
    policyId: foo.id,
    type: "static",
    name: "foo",
    description: "Alert when transactions are taking too long",
    titleTemplate: "Issue in environment: {{ tags.environment }}",
    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,
    ignoreOnExpectedTermination: 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",
    },
});
Copy
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.AlertPolicy("foo", name="foo")
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
    account_id="12345678",
    policy_id=foo.id,
    type="static",
    name="foo",
    description="Alert when transactions are taking too long",
    title_template="Issue in environment: {{ tags.environment }}",
    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,
    ignore_on_expected_termination=True,
    slide_by=30,
    nrql={
        "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
    },
    critical={
        "operator": "above",
        "threshold": 5.5,
        "threshold_duration": 300,
        "threshold_occurrences": "ALL",
    },
    warning={
        "operator": "above",
        "threshold": 3.5,
        "threshold_duration": 600,
        "threshold_occurrences": "ALL",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := newrelic.NewAlertPolicy(ctx, "foo", &newrelic.AlertPolicyArgs{
			Name: pulumi.String("foo"),
		})
		if err != nil {
			return err
		}
		_, err = newrelic.NewNrqlAlertCondition(ctx, "foo", &newrelic.NrqlAlertConditionArgs{
			AccountId:                   pulumi.String("12345678"),
			PolicyId:                    foo.ID(),
			Type:                        pulumi.String("static"),
			Name:                        pulumi.String("foo"),
			Description:                 pulumi.String("Alert when transactions are taking too long"),
			TitleTemplate:               pulumi.String("Issue in environment: {{ tags.environment }}"),
			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),
			IgnoreOnExpectedTermination: pulumi.Bool(true),
			SlideBy:                     pulumi.Int(30),
			Nrql: &newrelic.NrqlAlertConditionNrqlArgs{
				Query: pulumi.String("SELECT average(duration) FROM Transaction where appName = 'Your App'"),
			},
			Critical: &newrelic.NrqlAlertConditionCriticalArgs{
				Operator:             pulumi.String("above"),
				Threshold:            pulumi.Float64(5.5),
				ThresholdDuration:    pulumi.Int(300),
				ThresholdOccurrences: pulumi.String("ALL"),
			},
			Warning: &newrelic.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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var foo = new NewRelic.AlertPolicy("foo", new()
    {
        Name = "foo",
    });

    var fooNrqlAlertCondition = new NewRelic.NrqlAlertCondition("foo", new()
    {
        AccountId = "12345678",
        PolicyId = foo.Id,
        Type = "static",
        Name = "foo",
        Description = "Alert when transactions are taking too long",
        TitleTemplate = "Issue in environment: {{ tags.environment }}",
        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,
        IgnoreOnExpectedTermination = 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",
        },
    });

});
Copy
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.AlertPolicyArgs;
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 foo = new AlertPolicy("foo", AlertPolicyArgs.builder()
            .name("foo")
            .build());

        var fooNrqlAlertCondition = new NrqlAlertCondition("fooNrqlAlertCondition", NrqlAlertConditionArgs.builder()
            .accountId(12345678)
            .policyId(foo.id())
            .type("static")
            .name("foo")
            .description("Alert when transactions are taking too long")
            .titleTemplate("Issue in environment: {{ tags.environment }}")
            .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)
            .ignoreOnExpectedTermination(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());

    }
}
Copy
resources:
  foo:
    type: newrelic:AlertPolicy
    properties:
      name: foo
  fooNrqlAlertCondition:
    type: newrelic:NrqlAlertCondition
    name: foo
    properties:
      accountId: 1.2345678e+07
      policyId: ${foo.id}
      type: static
      name: foo
      description: Alert when transactions are taking too long
      titleTemplate: 'Issue in environment: {{ tags.environment }}'
      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
      ignoreOnExpectedTermination: 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
Copy

NRQL

The nrql block supports the following arguments:

  • query - (Required) The NRQL query to execute for the condition.
  • data_account_id - (Optional) The account ID to use for the alert condition’s query as specified in the the query field. If data_account_id is not specified, then the condition’s query will be evaluated against the account_id. Note that the account_id must have read privileges for the data_account_id or else the condition will be invalid.
  • evaluation_offset - (Optional) DEPRECATED: Use aggregation_method instead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on their aggregation_window size. 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 incidents sooner, but you may see more false positives and negatives due to data latency. With evaluation_offset set to 3 windows and an aggregation_window of 60 seconds, the NRQL time window applied to your query will be: SINCE 3 minutes ago UNTIL 2 minutes ago. evaluation_offset cannot be set with aggregation_method, aggregation_delay, or aggregation_timer.
  • since_value - (Optional) DEPRECATED: Use aggregation_method instead. The value to be used in the SINCE <X> minutes ago clause for the NRQL query. Must be between 1-20 (inclusive).

Terms

NOTE: The direct use of the term has been deprecated, and users should use critical and warning instead. What follows now applies to the named priority attributes for critical and warning, but for those attributes the priority is not allowed. At least one critical or warning term must be defined.

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 are above, above_or_equals, below, below_or_equals, equals, or not_equals (case insensitive). Defaults to equals. Note that when using a type of baseline, the only valid option here is above.

  • priority - (Optional) critical or warning. Defaults to critical.

  • threshold - (Required) The value which will trigger an incident.
    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 an incident.

  • threshold_duration - (Optional) The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the aggregation_window (which has a default of 60 seconds).
    For baseline NRQL alert conditions, the value must be within 120-86400 seconds (inclusive).
    For static NRQL alert conditions, the value must be within 60-86400 seconds (inclusive).

  • threshold_occurrences - (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: all or at_least_once (case insensitive).

  • duration - (Optional) DEPRECATED: Use threshold_duration instead. The duration of time, in minutes, that the threshold must violate for in order to create an incident. Must be within 1-120 (inclusive).

  • time_function - (Optional) DEPRECATED: Use threshold_occurrences instead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: all or any.

  • prediction - (Optional) BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static NRQL alert conditions. See Prediction below for details.

NOTE: When a critical or warning block is added to this resource, using either duration or threshold_duration (one of the two) is mandatory. Both of these should not be specified.

NOTE: When a critical or warning block is added to this resource, using either time_function or threshold_occurrences (one of the two) is mandatory. Both of these should not be specified.

Prediction

BETA PREVIEW: The prediction block is in limited release and only enabled for preview on a per-account basis.

NOTE: The prediction block is only available for static NRQL alert conditions.

The prediction block supports the following arguments:

  • predict_by - (Optional) The duration, in seconds, that the prediction should look into the future. Default is 3600 seconds (1 hour).
  • prefer_prediction_violation - (Optional) If a prediction incident is open when a term’s static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening. Default is false.

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 foo = new newrelic.AlertPolicy("foo", {name: "foo"});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("foo", {
    accountId: "your_account_id",
    policyId: foo.id,
    type: "static",
    name: "foo",
    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",
    },
});
Copy
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.AlertPolicy("foo", name="foo")
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
    account_id="your_account_id",
    policy_id=foo.id,
    type="static",
    name="foo",
    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={
        "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
    },
    critical={
        "operator": "above",
        "threshold": 5.5,
        "threshold_duration": 300,
        "threshold_occurrences": "ALL",
    },
    warning={
        "operator": "above",
        "threshold": 3.5,
        "threshold_duration": 600,
        "threshold_occurrences": "ALL",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := newrelic.NewAlertPolicy(ctx, "foo", &newrelic.AlertPolicyArgs{
			Name: pulumi.String("foo"),
		})
		if err != nil {
			return err
		}
		_, err = newrelic.NewNrqlAlertCondition(ctx, "foo", &newrelic.NrqlAlertConditionArgs{
			AccountId:                   pulumi.String("your_account_id"),
			PolicyId:                    foo.ID(),
			Type:                        pulumi.String("static"),
			Name:                        pulumi.String("foo"),
			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: &newrelic.NrqlAlertConditionNrqlArgs{
				Query: pulumi.String("SELECT average(duration) FROM Transaction where appName = 'Your App'"),
			},
			Critical: &newrelic.NrqlAlertConditionCriticalArgs{
				Operator:             pulumi.String("above"),
				Threshold:            pulumi.Float64(5.5),
				ThresholdDuration:    pulumi.Int(300),
				ThresholdOccurrences: pulumi.String("ALL"),
			},
			Warning: &newrelic.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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var foo = new NewRelic.AlertPolicy("foo", new()
    {
        Name = "foo",
    });

    var fooNrqlAlertCondition = new NewRelic.NrqlAlertCondition("foo", new()
    {
        AccountId = "your_account_id",
        PolicyId = foo.Id,
        Type = "static",
        Name = "foo",
        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",
        },
    });

});
Copy
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.AlertPolicyArgs;
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 foo = new AlertPolicy("foo", AlertPolicyArgs.builder()
            .name("foo")
            .build());

        var fooNrqlAlertCondition = new NrqlAlertCondition("fooNrqlAlertCondition", NrqlAlertConditionArgs.builder()
            .accountId("your_account_id")
            .policyId(foo.id())
            .type("static")
            .name("foo")
            .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());

    }
}
Copy
resources:
  foo:
    type: newrelic:AlertPolicy
    properties:
      name: foo
  fooNrqlAlertCondition:
    type: newrelic:NrqlAlertCondition
    name: foo
    properties:
      accountId: your_account_id
      policyId: ${foo.id}
      type: static
      name: foo
      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
Copy

Tags

Manage NRQL alert condition tags with newrelic.EntityTags. For up-to-date documentation about the tagging resource, please check newrelic.EntityTags.

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.AlertPolicy("foo", {name: "foo"});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("foo", {
    accountId: "12345678",
    policyId: foo.id,
    type: "static",
    name: "foo",
    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",
    },
});
const myConditionEntityTags = new newrelic.EntityTags("my_condition_entity_tags", {
    guid: fooNrqlAlertCondition.entityGuid,
    tags: [
        {
            key: "my-key",
            values: [
                "my-value",
                "my-other-value",
            ],
        },
        {
            key: "my-key-2",
            values: ["my-value-2"],
        },
    ],
});
Copy
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.AlertPolicy("foo", name="foo")
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
    account_id="12345678",
    policy_id=foo.id,
    type="static",
    name="foo",
    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={
        "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
    },
    critical={
        "operator": "above",
        "threshold": 5.5,
        "threshold_duration": 300,
        "threshold_occurrences": "ALL",
    },
    warning={
        "operator": "above",
        "threshold": 3.5,
        "threshold_duration": 600,
        "threshold_occurrences": "ALL",
    })
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
    guid=foo_nrql_alert_condition.entity_guid,
    tags=[
        {
            "key": "my-key",
            "values": [
                "my-value",
                "my-other-value",
            ],
        },
        {
            "key": "my-key-2",
            "values": ["my-value-2"],
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := newrelic.NewAlertPolicy(ctx, "foo", &newrelic.AlertPolicyArgs{
			Name: pulumi.String("foo"),
		})
		if err != nil {
			return err
		}
		fooNrqlAlertCondition, err := newrelic.NewNrqlAlertCondition(ctx, "foo", &newrelic.NrqlAlertConditionArgs{
			AccountId:                   pulumi.String("12345678"),
			PolicyId:                    foo.ID(),
			Type:                        pulumi.String("static"),
			Name:                        pulumi.String("foo"),
			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: &newrelic.NrqlAlertConditionNrqlArgs{
				Query: pulumi.String("SELECT average(duration) FROM Transaction where appName = 'Your App'"),
			},
			Critical: &newrelic.NrqlAlertConditionCriticalArgs{
				Operator:             pulumi.String("above"),
				Threshold:            pulumi.Float64(5.5),
				ThresholdDuration:    pulumi.Int(300),
				ThresholdOccurrences: pulumi.String("ALL"),
			},
			Warning: &newrelic.NrqlAlertConditionWarningArgs{
				Operator:             pulumi.String("above"),
				Threshold:            pulumi.Float64(3.5),
				ThresholdDuration:    pulumi.Int(600),
				ThresholdOccurrences: pulumi.String("ALL"),
			},
		})
		if err != nil {
			return err
		}
		_, err = newrelic.NewEntityTags(ctx, "my_condition_entity_tags", &newrelic.EntityTagsArgs{
			Guid: fooNrqlAlertCondition.EntityGuid,
			Tags: newrelic.EntityTagsTagArray{
				&newrelic.EntityTagsTagArgs{
					Key: pulumi.String("my-key"),
					Values: pulumi.StringArray{
						pulumi.String("my-value"),
						pulumi.String("my-other-value"),
					},
				},
				&newrelic.EntityTagsTagArgs{
					Key: pulumi.String("my-key-2"),
					Values: pulumi.StringArray{
						pulumi.String("my-value-2"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var foo = new NewRelic.AlertPolicy("foo", new()
    {
        Name = "foo",
    });

    var fooNrqlAlertCondition = new NewRelic.NrqlAlertCondition("foo", new()
    {
        AccountId = "12345678",
        PolicyId = foo.Id,
        Type = "static",
        Name = "foo",
        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",
        },
    });

    var myConditionEntityTags = new NewRelic.EntityTags("my_condition_entity_tags", new()
    {
        Guid = fooNrqlAlertCondition.EntityGuid,
        Tags = new[]
        {
            new NewRelic.Inputs.EntityTagsTagArgs
            {
                Key = "my-key",
                Values = new[]
                {
                    "my-value",
                    "my-other-value",
                },
            },
            new NewRelic.Inputs.EntityTagsTagArgs
            {
                Key = "my-key-2",
                Values = new[]
                {
                    "my-value-2",
                },
            },
        },
    });

});
Copy
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.AlertPolicyArgs;
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 com.pulumi.newrelic.EntityTags;
import com.pulumi.newrelic.EntityTagsArgs;
import com.pulumi.newrelic.inputs.EntityTagsTagArgs;
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 foo = new AlertPolicy("foo", AlertPolicyArgs.builder()
            .name("foo")
            .build());

        var fooNrqlAlertCondition = new NrqlAlertCondition("fooNrqlAlertCondition", NrqlAlertConditionArgs.builder()
            .accountId(12345678)
            .policyId(foo.id())
            .type("static")
            .name("foo")
            .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());

        var myConditionEntityTags = new EntityTags("myConditionEntityTags", EntityTagsArgs.builder()
            .guid(fooNrqlAlertCondition.entityGuid())
            .tags(            
                EntityTagsTagArgs.builder()
                    .key("my-key")
                    .values(                    
                        "my-value",
                        "my-other-value")
                    .build(),
                EntityTagsTagArgs.builder()
                    .key("my-key-2")
                    .values("my-value-2")
                    .build())
            .build());

    }
}
Copy
resources:
  foo:
    type: newrelic:AlertPolicy
    properties:
      name: foo
  fooNrqlAlertCondition:
    type: newrelic:NrqlAlertCondition
    name: foo
    properties:
      accountId: 1.2345678e+07
      policyId: ${foo.id}
      type: static
      name: foo
      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
  myConditionEntityTags:
    type: newrelic:EntityTags
    name: my_condition_entity_tags
    properties:
      guid: ${fooNrqlAlertCondition.entityGuid}
      tags:
        - key: my-key
          values:
            - my-value
            - my-other-value
        - key: my-key-2
          values:
            - my-value-2
Copy

alerts.newrelic.com/accounts/<account_id>/policies/<policy_id>/conditions/<condition_id>/edit

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 z = new newrelic.NrqlAlertCondition("z", {
    policyId: zNewrelicAlertPolicy.id,
    name: "zleslie-test",
    type: "static",
    runbookUrl: "https://localhost",
    enabled: true,
    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",
    },
});
Copy
import pulumi
import pulumi_newrelic as newrelic

z = newrelic.NrqlAlertCondition("z",
    policy_id=z_newrelic_alert_policy["id"],
    name="zleslie-test",
    type="static",
    runbook_url="https://localhost",
    enabled=True,
    violation_time_limit="TWENTY_FOUR_HOURS",
    critical={
        "operator": "above",
        "threshold_duration": 120,
        "threshold": 3,
        "threshold_occurrences": "AT_LEAST_ONCE",
    },
    nrql={
        "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := newrelic.NewNrqlAlertCondition(ctx, "z", &newrelic.NrqlAlertConditionArgs{
			PolicyId:           pulumi.Any(zNewrelicAlertPolicy.Id),
			Name:               pulumi.String("zleslie-test"),
			Type:               pulumi.String("static"),
			RunbookUrl:         pulumi.String("https://localhost"),
			Enabled:            pulumi.Bool(true),
			ViolationTimeLimit: pulumi.String("TWENTY_FOUR_HOURS"),
			Critical: &newrelic.NrqlAlertConditionCriticalArgs{
				Operator:             pulumi.String("above"),
				ThresholdDuration:    pulumi.Int(120),
				Threshold:            pulumi.Float64(3),
				ThresholdOccurrences: pulumi.String("AT_LEAST_ONCE"),
			},
			Nrql: &newrelic.NrqlAlertConditionNrqlArgs{
				Query: pulumi.String("SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var z = new NewRelic.NrqlAlertCondition("z", new()
    {
        PolicyId = zNewrelicAlertPolicy.Id,
        Name = "zleslie-test",
        Type = "static",
        RunbookUrl = "https://localhost",
        Enabled = true,
        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",
        },
    });

});
Copy
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 z = new NrqlAlertCondition("z", NrqlAlertConditionArgs.builder()
            .policyId(zNewrelicAlertPolicy.id())
            .name("zleslie-test")
            .type("static")
            .runbookUrl("https://localhost")
            .enabled(true)
            .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());

    }
}
Copy
resources:
  z:
    type: newrelic:NrqlAlertCondition
    properties:
      policyId: ${zNewrelicAlertPolicy.id}
      name: zleslie-test
      type: static
      runbookUrl: https://localhost
      enabled: true
      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
Copy

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 z = new newrelic.NrqlAlertCondition("z", {
    policyId: zNewrelicAlertPolicy.id,
    name: "zleslie-test",
    type: "static",
    runbookUrl: "https://localhost",
    enabled: true,
    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",
    },
});
Copy
import pulumi
import pulumi_newrelic as newrelic

z = newrelic.NrqlAlertCondition("z",
    policy_id=z_newrelic_alert_policy["id"],
    name="zleslie-test",
    type="static",
    runbook_url="https://localhost",
    enabled=True,
    violation_time_limit_seconds=86400,
    terms=[{
        "priority": "critical",
        "operator": "above",
        "threshold": 3,
        "duration": 5,
        "time_function": "any",
    }],
    nrql={
        "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := newrelic.NewNrqlAlertCondition(ctx, "z", &newrelic.NrqlAlertConditionArgs{
			PolicyId:                  pulumi.Any(zNewrelicAlertPolicy.Id),
			Name:                      pulumi.String("zleslie-test"),
			Type:                      pulumi.String("static"),
			RunbookUrl:                pulumi.String("https://localhost"),
			Enabled:                   pulumi.Bool(true),
			ViolationTimeLimitSeconds: pulumi.Int(86400),
			Terms: newrelic.NrqlAlertConditionTermArray{
				&newrelic.NrqlAlertConditionTermArgs{
					Priority:     pulumi.String("critical"),
					Operator:     pulumi.String("above"),
					Threshold:    pulumi.Float64(3),
					Duration:     pulumi.Int(5),
					TimeFunction: pulumi.String("any"),
				},
			},
			Nrql: &newrelic.NrqlAlertConditionNrqlArgs{
				Query: pulumi.String("SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;

return await Deployment.RunAsync(() => 
{
    var z = new NewRelic.NrqlAlertCondition("z", new()
    {
        PolicyId = zNewrelicAlertPolicy.Id,
        Name = "zleslie-test",
        Type = "static",
        RunbookUrl = "https://localhost",
        Enabled = true,
        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",
        },
    });

});
Copy
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 z = new NrqlAlertCondition("z", NrqlAlertConditionArgs.builder()
            .policyId(zNewrelicAlertPolicy.id())
            .name("zleslie-test")
            .type("static")
            .runbookUrl("https://localhost")
            .enabled(true)
            .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());

    }
}
Copy
resources:
  z:
    type: newrelic:NrqlAlertCondition
    properties:
      policyId: ${zNewrelicAlertPolicy.id}
      name: zleslie-test
      type: static
      runbookUrl: https://localhost
      enabled: true
      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
Copy

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[str] = None,
                       close_violations_on_expiration: Optional[bool] = None,
                       account_id: Optional[str] = None,
                       ignore_on_expected_termination: Optional[bool] = None,
                       baseline_direction: Optional[str] = None,
                       name: Optional[str] = None,
                       critical: Optional[NrqlAlertConditionCriticalArgs] = None,
                       description: Optional[str] = None,
                       aggregation_method: Optional[str] = None,
                       evaluation_delay: Optional[int] = None,
                       expiration_duration: Optional[int] = None,
                       fill_option: Optional[str] = None,
                       fill_value: Optional[float] = None,
                       aggregation_window: Optional[int] = None,
                       aggregation_timer: Optional[str] = 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,
                       title_template: Optional[str] = None,
                       type: 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 This property is required. string
The unique name of the resource.
args This property is required. NrqlAlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. NrqlAlertConditionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NrqlAlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
        DataAccountId = "string",
    },
    PolicyId = "string",
    CloseViolationsOnExpiration = false,
    AccountId = "string",
    IgnoreOnExpectedTermination = false,
    BaselineDirection = "string",
    Name = "string",
    Critical = new NewRelic.Inputs.NrqlAlertConditionCriticalArgs
    {
        Threshold = 0,
        Operator = "string",
        Prediction = new NewRelic.Inputs.NrqlAlertConditionCriticalPredictionArgs
        {
            PredictBy = 0,
            PreferPredictionViolation = false,
        },
        ThresholdDuration = 0,
        ThresholdOccurrences = "string",
    },
    Description = "string",
    AggregationMethod = "string",
    EvaluationDelay = 0,
    ExpirationDuration = 0,
    FillOption = "string",
    FillValue = 0,
    AggregationWindow = 0,
    AggregationTimer = "string",
    Enabled = false,
    OpenViolationOnExpiration = false,
    AggregationDelay = "string",
    RunbookUrl = "string",
    SlideBy = 0,
    TitleTemplate = "string",
    Type = "string",
    ViolationTimeLimitSeconds = 0,
    Warning = new NewRelic.Inputs.NrqlAlertConditionWarningArgs
    {
        Threshold = 0,
        Operator = "string",
        Prediction = new NewRelic.Inputs.NrqlAlertConditionWarningPredictionArgs
        {
            PredictBy = 0,
            PreferPredictionViolation = false,
        },
        ThresholdDuration = 0,
        ThresholdOccurrences = "string",
    },
});
Copy
example, err := newrelic.NewNrqlAlertCondition(ctx, "nrqlAlertConditionResource", &newrelic.NrqlAlertConditionArgs{
	Nrql: &newrelic.NrqlAlertConditionNrqlArgs{
		Query:         pulumi.String("string"),
		DataAccountId: pulumi.String("string"),
	},
	PolicyId:                    pulumi.String("string"),
	CloseViolationsOnExpiration: pulumi.Bool(false),
	AccountId:                   pulumi.String("string"),
	IgnoreOnExpectedTermination: pulumi.Bool(false),
	BaselineDirection:           pulumi.String("string"),
	Name:                        pulumi.String("string"),
	Critical: &newrelic.NrqlAlertConditionCriticalArgs{
		Threshold: pulumi.Float64(0),
		Operator:  pulumi.String("string"),
		Prediction: &newrelic.NrqlAlertConditionCriticalPredictionArgs{
			PredictBy:                 pulumi.Int(0),
			PreferPredictionViolation: pulumi.Bool(false),
		},
		ThresholdDuration:    pulumi.Int(0),
		ThresholdOccurrences: pulumi.String("string"),
	},
	Description:               pulumi.String("string"),
	AggregationMethod:         pulumi.String("string"),
	EvaluationDelay:           pulumi.Int(0),
	ExpirationDuration:        pulumi.Int(0),
	FillOption:                pulumi.String("string"),
	FillValue:                 pulumi.Float64(0),
	AggregationWindow:         pulumi.Int(0),
	AggregationTimer:          pulumi.String("string"),
	Enabled:                   pulumi.Bool(false),
	OpenViolationOnExpiration: pulumi.Bool(false),
	AggregationDelay:          pulumi.String("string"),
	RunbookUrl:                pulumi.String("string"),
	SlideBy:                   pulumi.Int(0),
	TitleTemplate:             pulumi.String("string"),
	Type:                      pulumi.String("string"),
	ViolationTimeLimitSeconds: pulumi.Int(0),
	Warning: &newrelic.NrqlAlertConditionWarningArgs{
		Threshold: pulumi.Float64(0),
		Operator:  pulumi.String("string"),
		Prediction: &newrelic.NrqlAlertConditionWarningPredictionArgs{
			PredictBy:                 pulumi.Int(0),
			PreferPredictionViolation: pulumi.Bool(false),
		},
		ThresholdDuration:    pulumi.Int(0),
		ThresholdOccurrences: pulumi.String("string"),
	},
})
Copy
var nrqlAlertConditionResource = new NrqlAlertCondition("nrqlAlertConditionResource", NrqlAlertConditionArgs.builder()
    .nrql(NrqlAlertConditionNrqlArgs.builder()
        .query("string")
        .dataAccountId("string")
        .build())
    .policyId("string")
    .closeViolationsOnExpiration(false)
    .accountId("string")
    .ignoreOnExpectedTermination(false)
    .baselineDirection("string")
    .name("string")
    .critical(NrqlAlertConditionCriticalArgs.builder()
        .threshold(0)
        .operator("string")
        .prediction(NrqlAlertConditionCriticalPredictionArgs.builder()
            .predictBy(0)
            .preferPredictionViolation(false)
            .build())
        .thresholdDuration(0)
        .thresholdOccurrences("string")
        .build())
    .description("string")
    .aggregationMethod("string")
    .evaluationDelay(0)
    .expirationDuration(0)
    .fillOption("string")
    .fillValue(0)
    .aggregationWindow(0)
    .aggregationTimer("string")
    .enabled(false)
    .openViolationOnExpiration(false)
    .aggregationDelay("string")
    .runbookUrl("string")
    .slideBy(0)
    .titleTemplate("string")
    .type("string")
    .violationTimeLimitSeconds(0)
    .warning(NrqlAlertConditionWarningArgs.builder()
        .threshold(0)
        .operator("string")
        .prediction(NrqlAlertConditionWarningPredictionArgs.builder()
            .predictBy(0)
            .preferPredictionViolation(false)
            .build())
        .thresholdDuration(0)
        .thresholdOccurrences("string")
        .build())
    .build());
Copy
nrql_alert_condition_resource = newrelic.NrqlAlertCondition("nrqlAlertConditionResource",
    nrql={
        "query": "string",
        "data_account_id": "string",
    },
    policy_id="string",
    close_violations_on_expiration=False,
    account_id="string",
    ignore_on_expected_termination=False,
    baseline_direction="string",
    name="string",
    critical={
        "threshold": 0,
        "operator": "string",
        "prediction": {
            "predict_by": 0,
            "prefer_prediction_violation": False,
        },
        "threshold_duration": 0,
        "threshold_occurrences": "string",
    },
    description="string",
    aggregation_method="string",
    evaluation_delay=0,
    expiration_duration=0,
    fill_option="string",
    fill_value=0,
    aggregation_window=0,
    aggregation_timer="string",
    enabled=False,
    open_violation_on_expiration=False,
    aggregation_delay="string",
    runbook_url="string",
    slide_by=0,
    title_template="string",
    type="string",
    violation_time_limit_seconds=0,
    warning={
        "threshold": 0,
        "operator": "string",
        "prediction": {
            "predict_by": 0,
            "prefer_prediction_violation": False,
        },
        "threshold_duration": 0,
        "threshold_occurrences": "string",
    })
Copy
const nrqlAlertConditionResource = new newrelic.NrqlAlertCondition("nrqlAlertConditionResource", {
    nrql: {
        query: "string",
        dataAccountId: "string",
    },
    policyId: "string",
    closeViolationsOnExpiration: false,
    accountId: "string",
    ignoreOnExpectedTermination: false,
    baselineDirection: "string",
    name: "string",
    critical: {
        threshold: 0,
        operator: "string",
        prediction: {
            predictBy: 0,
            preferPredictionViolation: false,
        },
        thresholdDuration: 0,
        thresholdOccurrences: "string",
    },
    description: "string",
    aggregationMethod: "string",
    evaluationDelay: 0,
    expirationDuration: 0,
    fillOption: "string",
    fillValue: 0,
    aggregationWindow: 0,
    aggregationTimer: "string",
    enabled: false,
    openViolationOnExpiration: false,
    aggregationDelay: "string",
    runbookUrl: "string",
    slideBy: 0,
    titleTemplate: "string",
    type: "string",
    violationTimeLimitSeconds: 0,
    warning: {
        threshold: 0,
        operator: "string",
        prediction: {
            predictBy: 0,
            preferPredictionViolation: false,
        },
        thresholdDuration: 0,
        thresholdOccurrences: "string",
    },
});
Copy
type: newrelic:NrqlAlertCondition
properties:
    accountId: string
    aggregationDelay: string
    aggregationMethod: string
    aggregationTimer: string
    aggregationWindow: 0
    baselineDirection: string
    closeViolationsOnExpiration: false
    critical:
        operator: string
        prediction:
            predictBy: 0
            preferPredictionViolation: false
        threshold: 0
        thresholdDuration: 0
        thresholdOccurrences: string
    description: string
    enabled: false
    evaluationDelay: 0
    expirationDuration: 0
    fillOption: string
    fillValue: 0
    ignoreOnExpectedTermination: false
    name: string
    nrql:
        dataAccountId: string
        query: string
    openViolationOnExpiration: false
    policyId: string
    runbookUrl: string
    slideBy: 0
    titleTemplate: string
    type: string
    violationTimeLimitSeconds: 0
    warning:
        operator: string
        prediction:
            predictBy: 0
            preferPredictionViolation: false
        threshold: 0
        thresholdDuration: 0
        thresholdOccurrences: string
Copy

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 This property is required. Pulumi.NewRelic.Inputs.NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
PolicyId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the policy where this condition should be used.
AccountId string
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.
AggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
AggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
AggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
AggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
BaselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
CloseViolationsOnExpiration bool
Whether to close all open incidents when the signal expires.
Critical Pulumi.NewRelic.Inputs.NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
EvaluationDelay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
ExpirationDuration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
FillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
FillValue double
This value will be used for filling gaps in the signal.
IgnoreOnExpectedTermination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
Name string
The title of the condition.
OpenViolationOnExpiration bool
Whether to create a new incident to capture that the signal expired.
RunbookUrl string
Runbook URL to display in notifications.
SlideBy int
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
Terms List<Pulumi.NewRelic.Inputs.NrqlAlertConditionTerm>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

TitleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
Type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
ViolationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

ViolationTimeLimitSeconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
Warning Pulumi.NewRelic.Inputs.NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
Nrql This property is required. NrqlAlertConditionNrqlArgs
A NRQL query. See NRQL below for details.
PolicyId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the policy where this condition should be used.
AccountId string
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.
AggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
AggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
AggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
AggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
BaselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
CloseViolationsOnExpiration bool
Whether to close all open incidents when the signal expires.
Critical NrqlAlertConditionCriticalArgs
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
EvaluationDelay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
ExpirationDuration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
FillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
FillValue float64
This value will be used for filling gaps in the signal.
IgnoreOnExpectedTermination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
Name string
The title of the condition.
OpenViolationOnExpiration bool
Whether to create a new incident to capture that the signal expired.
RunbookUrl string
Runbook URL to display in notifications.
SlideBy int
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
Terms []NrqlAlertConditionTermArgs
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

TitleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
Type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
ViolationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

ViolationTimeLimitSeconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
Warning NrqlAlertConditionWarningArgs
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
nrql This property is required. NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
policyId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the policy where this condition should be used.
accountId String
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod String
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer String
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection String
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration Boolean
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
evaluationDelay Integer
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration Integer
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption String
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue Double
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination Boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name String
The title of the condition.
openViolationOnExpiration Boolean
Whether to create a new incident to capture that the signal expired.
runbookUrl String
Runbook URL to display in notifications.
slideBy Integer
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms List<NrqlAlertConditionTerm>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate String
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. String
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit String
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds Integer
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
nrql This property is required. NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
policyId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the policy where this condition should be used.
accountId string
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration boolean
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
evaluationDelay number
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration number
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue number
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name string
The title of the condition.
openViolationOnExpiration boolean
Whether to create a new incident to capture that the signal expired.
runbookUrl string
Runbook URL to display in notifications.
slideBy number
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms NrqlAlertConditionTerm[]
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds number
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
nrql This property is required. NrqlAlertConditionNrqlArgs
A NRQL query. See NRQL below for details.
policy_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the policy where this condition should be used.
account_id str
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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregation_method str
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.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_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.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 21600 seconds (6 hours). 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_on_expiration bool
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCriticalArgs
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
evaluation_delay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expiration_duration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fill_option str
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fill_value float
This value will be used for filling gaps in the signal.
ignore_on_expected_termination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name str
The title of the condition.
open_violation_on_expiration bool
Whether to create a new incident 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_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms Sequence[NrqlAlertConditionTermArgs]
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

title_template str
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. str
The type of the condition. Valid values are static or baseline. Defaults to static.
violation_time_limit str
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violation_time_limit_seconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarningArgs
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
nrql This property is required. Property Map
A NRQL query. See NRQL below for details.
policyId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the policy where this condition should be used.
accountId String
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod String
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer String
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection String
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration Boolean
Whether to close all open incidents when the signal expires.
critical Property Map
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
evaluationDelay Number
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration Number
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption String
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue Number
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination Boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name String
The title of the condition.
openViolationOnExpiration Boolean
Whether to create a new incident to capture that the signal expired.
runbookUrl String
Runbook URL to display in notifications.
slideBy Number
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms List<Property Map>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate String
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. String
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit String
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds Number
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning Property Map
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.

Outputs

All input properties are implicitly available as output properties. Additionally, the NrqlAlertCondition resource produces the following output properties:

EntityGuid string
The unique entity identifier of the NRQL Condition in New Relic.
Id string
The provider-assigned unique ID for this managed resource.
EntityGuid string
The unique entity identifier of the NRQL Condition in New Relic.
Id string
The provider-assigned unique ID for this managed resource.
entityGuid String
The unique entity identifier of the NRQL Condition in New Relic.
id String
The provider-assigned unique ID for this managed resource.
entityGuid 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.
entityGuid 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[str] = 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,
        evaluation_delay: Optional[int] = None,
        expiration_duration: Optional[int] = None,
        fill_option: Optional[str] = None,
        fill_value: Optional[float] = None,
        ignore_on_expected_termination: Optional[bool] = None,
        name: Optional[str] = None,
        nrql: Optional[NrqlAlertConditionNrqlArgs] = None,
        open_violation_on_expiration: Optional[bool] = None,
        policy_id: Optional[str] = None,
        runbook_url: Optional[str] = None,
        slide_by: Optional[int] = None,
        terms: Optional[Sequence[NrqlAlertConditionTermArgs]] = None,
        title_template: Optional[str] = None,
        type: Optional[str] = None,
        violation_time_limit: Optional[str] = None,
        violation_time_limit_seconds: Optional[int] = None,
        warning: Optional[NrqlAlertConditionWarningArgs] = None) -> NrqlAlertCondition
func 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId string
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.
AggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
AggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
AggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
AggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
BaselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
CloseViolationsOnExpiration bool
Whether to close all open incidents when the signal expires.
Critical Pulumi.NewRelic.Inputs.NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
EntityGuid string
The unique entity identifier of the NRQL Condition in New Relic.
EvaluationDelay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
ExpirationDuration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
FillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
FillValue double
This value will be used for filling gaps in the signal.
IgnoreOnExpectedTermination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
Name string
The title of the condition.
Nrql Pulumi.NewRelic.Inputs.NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
OpenViolationOnExpiration bool
Whether to create a new incident to capture that the signal expired.
PolicyId Changes to this property will trigger replacement. string
The ID of the policy where this condition should be used.
RunbookUrl string
Runbook URL to display in notifications.
SlideBy int
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
Terms List<Pulumi.NewRelic.Inputs.NrqlAlertConditionTerm>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

TitleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
Type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
ViolationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

ViolationTimeLimitSeconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
Warning Pulumi.NewRelic.Inputs.NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
AccountId string
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.
AggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
AggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
AggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
AggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
BaselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
CloseViolationsOnExpiration bool
Whether to close all open incidents when the signal expires.
Critical NrqlAlertConditionCriticalArgs
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
EntityGuid string
The unique entity identifier of the NRQL Condition in New Relic.
EvaluationDelay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
ExpirationDuration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
FillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
FillValue float64
This value will be used for filling gaps in the signal.
IgnoreOnExpectedTermination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
Name string
The title of the condition.
Nrql NrqlAlertConditionNrqlArgs
A NRQL query. See NRQL below for details.
OpenViolationOnExpiration bool
Whether to create a new incident to capture that the signal expired.
PolicyId Changes to this property will trigger replacement. string
The ID of the policy where this condition should be used.
RunbookUrl string
Runbook URL to display in notifications.
SlideBy int
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
Terms []NrqlAlertConditionTermArgs
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

TitleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
Type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
ViolationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

ViolationTimeLimitSeconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
Warning NrqlAlertConditionWarningArgs
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
accountId String
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod String
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer String
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection String
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration Boolean
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
entityGuid String
The unique entity identifier of the NRQL Condition in New Relic.
evaluationDelay Integer
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration Integer
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption String
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue Double
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination Boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name String
The title of the condition.
nrql NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
openViolationOnExpiration Boolean
Whether to create a new incident to capture that the signal expired.
policyId Changes to this property will trigger replacement. String
The ID of the policy where this condition should be used.
runbookUrl String
Runbook URL to display in notifications.
slideBy Integer
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms List<NrqlAlertConditionTerm>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate String
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. String
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit String
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds Integer
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
accountId string
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod string
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer string
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection string
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration boolean
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCritical
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
entityGuid string
The unique entity identifier of the NRQL Condition in New Relic.
evaluationDelay number
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration number
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption string
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue number
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name string
The title of the condition.
nrql NrqlAlertConditionNrql
A NRQL query. See NRQL below for details.
openViolationOnExpiration boolean
Whether to create a new incident to capture that the signal expired.
policyId Changes to this property will trigger replacement. string
The ID of the policy where this condition should be used.
runbookUrl string
Runbook URL to display in notifications.
slideBy number
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms NrqlAlertConditionTerm[]
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate string
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. string
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit string
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds number
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarning
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
account_id str
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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregation_method str
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.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_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.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 21600 seconds (6 hours). 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_on_expiration bool
Whether to close all open incidents when the signal expires.
critical NrqlAlertConditionCriticalArgs
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
entity_guid str
The unique entity identifier of the NRQL Condition in New Relic.
evaluation_delay int
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expiration_duration int
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fill_option str
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fill_value float
This value will be used for filling gaps in the signal.
ignore_on_expected_termination bool
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name str
The title of the condition.
nrql NrqlAlertConditionNrqlArgs
A NRQL query. See NRQL below for details.
open_violation_on_expiration bool
Whether to create a new incident to capture that the signal expired.
policy_id Changes to this property will trigger replacement. str
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_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms Sequence[NrqlAlertConditionTermArgs]
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

title_template str
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. str
The type of the condition. Valid values are static or baseline. Defaults to static.
violation_time_limit str
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violation_time_limit_seconds int
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning NrqlAlertConditionWarningArgs
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.
accountId String
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.
aggregationDelay 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_delay with the event_flow and cadence methods. The maximum delay is 1200 seconds (20 minutes) when using event_flow and 3600 seconds (60 minutes) when using cadence. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. aggregation_delay cannot be set with nrql.evaluation_offset.
aggregationMethod String
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are cadence, event_flow or event_timer. Default is event_flow. aggregation_method cannot be set with nrql.evaluation_offset.
aggregationTimer String
How long we wait after each data point arrives to make sure we've processed the whole batch. Use aggregation_timer with the event_timer method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. aggregation_timer cannot be set with nrql.evaluation_offset.
aggregationWindow 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 21600 seconds (6 hours). Default is 60 seconds.
baselineDirection String
The baseline direction of a baseline NRQL alert condition. Valid values are: lower_only, upper_and_lower, upper_only (case insensitive).
closeViolationsOnExpiration Boolean
Whether to close all open incidents when the signal expires.
critical Property Map
A list containing the critical threshold values. At least one critical or warning threshold must be defined. 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 true and false. Defaults to true.
entityGuid String
The unique entity identifier of the NRQL Condition in New Relic.
evaluationDelay Number
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
expirationDuration Number
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
fillOption String
Which strategy to use when filling gaps in the signal. Possible values are none, last_value or static. If static, the fill_value field will be used for filling gaps in the signal.
fillValue Number
This value will be used for filling gaps in the signal.
ignoreOnExpectedTermination Boolean
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
name String
The title of the condition.
nrql Property Map
A NRQL query. See NRQL below for details.
openViolationOnExpiration Boolean
Whether to create a new incident to capture that the signal expired.
policyId Changes to this property will trigger replacement. String
The ID of the policy where this condition should be used.
runbookUrl String
Runbook URL to display in notifications.
slideBy Number
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The slide_by value is specified in seconds and must be smaller than and a factor of the aggregation_window.
terms List<Property Map>
DEPRECATED Use critical, and warning instead. A list of terms for this condition. See Terms below for details.

Deprecated: use critical and warning attributes instead

titleTemplate String
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be Handlebars format.
type Changes to this property will trigger replacement. String
The type of the condition. Valid values are static or baseline. Defaults to static.
violationTimeLimit String
DEPRECATED: Use violation_time_limit_seconds instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are ONE_HOUR, TWO_HOURS, FOUR_HOURS, EIGHT_HOURS, TWELVE_HOURS, TWENTY_FOUR_HOURS, THIRTY_DAYS (case insensitive). *Note: One of violation_time_limit or violation_time_limit_seconds must be set, but not both.

Deprecated: use violation_time_limit_seconds attribute instead

violationTimeLimitSeconds Number
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident 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_limit or violation_time_limit_seconds must be set, but not both.
warning Property Map
A list containing the warning threshold values. At least one critical or warning threshold must be defined. See Terms below for details.

Supporting Types

NrqlAlertConditionCritical
, NrqlAlertConditionCriticalArgs

Threshold This property is required. double
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction Pulumi.NewRelic.Inputs.NrqlAlertConditionCriticalPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

Threshold This property is required. float64
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction NrqlAlertConditionCriticalPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Double
For baseline conditions must be in range [1, 1000].
duration Integer
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionCriticalPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration Integer
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. number
For baseline conditions must be in range [1, 1000].
duration number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionCriticalPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. float
For baseline conditions must be in range [1, 1000].
duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator str
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionCriticalPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
threshold_duration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
threshold_occurrences str
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
time_function str
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Number
For baseline conditions must be in range [1, 1000].
duration Number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction Property Map
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration Number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

NrqlAlertConditionCriticalPrediction
, NrqlAlertConditionCriticalPredictionArgs

PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Integer
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predict_by int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
prefer_prediction_violation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.

NrqlAlertConditionNrql
, NrqlAlertConditionNrqlArgs

Query This property is required. string
DataAccountId string
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
EvaluationOffset int
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

SinceValue string
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

Query This property is required. string
DataAccountId string
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
EvaluationOffset int
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

SinceValue string
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

query This property is required. String
dataAccountId String
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
evaluationOffset Integer
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

sinceValue String
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

query This property is required. string
dataAccountId string
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
evaluationOffset number
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

sinceValue string
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

query This property is required. str
data_account_id str
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
evaluation_offset int
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

since_value str
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

query This property is required. String
dataAccountId String
The New Relic account ID to use as the basis for the NRQL alert condition's query; will default to account_id if unspecified.
evaluationOffset Number
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's evaluation_offset.

Deprecated: use aggregation_method attribute instead

sinceValue String
NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's since_value.

Deprecated: use aggregation_method attribute instead

NrqlAlertConditionTerm
, NrqlAlertConditionTermArgs

Threshold This property is required. double
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction Pulumi.NewRelic.Inputs.NrqlAlertConditionTermPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
Priority string
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

Threshold This property is required. float64
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction NrqlAlertConditionTermPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
Priority string
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Double
For baseline conditions must be in range [1, 1000].
duration Integer
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionTermPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
priority String
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
thresholdDuration Integer
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. number
For baseline conditions must be in range [1, 1000].
duration number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionTermPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
priority string
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
thresholdDuration number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. float
For baseline conditions must be in range [1, 1000].
duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator str
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionTermPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
priority str
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
threshold_duration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
threshold_occurrences str
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
time_function str
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Number
For baseline conditions must be in range [1, 1000].
duration Number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction Property Map
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
priority String
One of (critical, warning). Defaults to 'critical'. At least one condition term must have priority set to 'critical'.
thresholdDuration Number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

NrqlAlertConditionTermPrediction
, NrqlAlertConditionTermPredictionArgs

PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Integer
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predict_by int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
prefer_prediction_violation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.

NrqlAlertConditionWarning
, NrqlAlertConditionWarningArgs

Threshold This property is required. double
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction Pulumi.NewRelic.Inputs.NrqlAlertConditionWarningPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

Threshold This property is required. float64
For baseline conditions must be in range [1, 1000].
Duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

Operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
Prediction NrqlAlertConditionWarningPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
ThresholdDuration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
ThresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
TimeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Double
For baseline conditions must be in range [1, 1000].
duration Integer
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionWarningPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration Integer
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. number
For baseline conditions must be in range [1, 1000].
duration number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator string
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionWarningPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences string
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction string
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. float
For baseline conditions must be in range [1, 1000].
duration int
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator str
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction NrqlAlertConditionWarningPrediction
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
threshold_duration int
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
threshold_occurrences str
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
time_function str
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

threshold This property is required. Number
For baseline conditions must be in range [1, 1000].
duration Number
In minutes, must be in the range of 1 to 120 (inclusive).

Deprecated: use threshold_duration attribute instead

operator String
One of (above, above_or_equals, below, below_or_equals, equals, not_equals). Defaults to 'equals'.
prediction Property Map
BETA PREVIEW: the prediction field is in limited release and only enabled for preview on a per-account basis. - Use prediction to open alerts when your static threshold is predicted to be reached in the future. The prediction field is only available for static conditions.
thresholdDuration Number
The duration, in seconds, that the threshold must violate in order to create an incident. Value must be a multiple of the 'aggregation_window' (which has a default of 60 seconds). Value must be within 120-86400 seconds for baseline conditions, and within 60-86400 seconds for static conditions
thresholdOccurrences String
The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: 'ALL' or 'AT_LEAST_ONCE' (case insensitive).
timeFunction String
Valid values are: 'all' or 'any'

Deprecated: use threshold_occurrences attribute instead

NrqlAlertConditionWarningPrediction
, NrqlAlertConditionWarningPredictionArgs

PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
PredictBy int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
PreferPredictionViolation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Integer
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predict_by int
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
prefer_prediction_violation bool
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.
predictBy Number
BETA PREVIEW: the predict_by field is in limited release and only enabled for preview on a per-account basis. - The duration, in seconds, that the prediction should look into the future.
preferPredictionViolation Boolean
BETA PREVIEW: the prefer_prediction_violation field is in limited release and only enabled for preview on a per-account basis. - If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting prefer_prediction_violation to true overrides this behavior leaving the prediction incident open and preventing a static incident from opening.

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
Copy

// For static conditions

$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
Copy

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 newrelic Terraform Provider.