Package @pulumi/newrelic
This page documents the language specification for the newrelic package. If you're looking for help working with the inputs, outputs, or functions of newrelic resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-newrelicrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-newrelicrepo.
var newrelic = require("@pulumi/newrelic");
import * as newrelic from "@pulumi/newrelic";Modules
Resources
- AlertChannel
- AlertCondition
- AlertPolicy
- AlertPolicyChannel
- Dashboard
- InfraAlertCondition
- NrqlAlertCondition
- Provider
Functions
Others
- AlertChannelArgs
- AlertChannelState
- AlertConditionArgs
- AlertConditionState
- AlertPolicyArgs
- AlertPolicyChannelArgs
- AlertPolicyChannelState
- AlertPolicyState
- DashboardArgs
- DashboardState
- GetAlertChannelArgs
- GetAlertChannelResult
- GetAlertPolicyArgs
- GetAlertPolicyResult
- GetApplicationArgs
- GetApplicationResult
- getEnv
- getEnvBoolean
- getEnvNumber
- GetKeyTransactionArgs
- GetKeyTransactionResult
- getVersion
- InfraAlertConditionArgs
- InfraAlertConditionState
- NrqlAlertConditionArgs
- NrqlAlertConditionState
- ProviderArgs
Resources
Resource AlertChannel
class AlertChannel extends CustomResourceUse this resource to create and manage New Relic alert policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
includeJsonAttachment: "1",
recipients: "foo@example.com",
},
type: "email",
});Additional Examples
Slack
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
channel: "example-alerts-channel",
url: "https://<YourOrganization>.slack.com",
},
type: "slack",
});OpsGenie
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
apiKey: "abc123",
recipients: "user1@domain.com, user2@domain.com",
tags: "tag1, tag2",
teams: "team1, team2",
},
type: "opsgenie",
});PagerDuty
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
serviceKey: "abc123",
},
type: "pagerduty",
});VictorOps
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
key: "abc123",
routeKey: "/example",
},
type: "victorops",
});Webhook
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
type: "webhook",
config: {
baseUrl: "http://www.test.com",
payloadType: "application/json",
payload: {
condition_name: `$CONDITION_NAME`,
policy_name: `$POLICY_NAME`,
},
headers: {
header1: value1,
header2: value2,
},
},
});Webhook with complex payload
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertChannel("foo", {
config: {
baseUrl: "http://www.test.com",
payloadString: `{
"myCustomValues": {
"conditionName": "$CONDITION_NAME",
"policyName": "$POLICY_NAME"
}
}
`,
payloadType: "application/json",
},
type: "webhook",
});constructor
new AlertChannel(name: string, args: AlertChannelArgs, opts?: pulumi.CustomResourceOptions)Create a AlertChannel resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertChannelState, opts?: pulumi.CustomResourceOptions): AlertChannelGet an existing AlertChannel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AlertChannelReturns true if the given object is an instance of AlertChannel. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property config
public config: pulumi.Output<AlertChannelConfig | undefined>;A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
property configuration
public configuration: pulumi.Output<{[key: string]: any} | undefined>;Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the channel.
property type
public type: pulumi.Output<string>;The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource AlertCondition
class AlertCondition extends CustomResourceUse this resource to create and manage alert conditions for APM, Browser, and Mobile in New Relic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const app = newrelic.getApplication({
name: "my-app",
});
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooAlertCondition = new newrelic.AlertCondition("fooAlertCondition", {
policyId: fooAlertPolicy.id,
type: "apmAppMetric",
entities: [app.then(app => app.id)],
metric: "apdex",
runbookUrl: "https://www.example.com",
conditionScope: "application",
term: [{
duration: 5,
operator: "below",
priority: "critical",
threshold: "0.75",
timeFunction: "all",
}],
});Terms
The term mapping supports the following arguments:
duration- (Required) In minutes, must be in the range of5to120, inclusive.operator- (Optional)above,below, orequal. Defaults toequal.priority- (Optional)criticalorwarning. Defaults tocritical. Terms must include at least onecriticalpriority termthreshold- (Required) Must be 0 or greater.timeFunction- (Required)allorany.
constructor
new AlertCondition(name: string, args: AlertConditionArgs, opts?: pulumi.CustomResourceOptions)Create a AlertCondition resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertConditionState, opts?: pulumi.CustomResourceOptions): AlertConditionGet an existing AlertCondition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AlertConditionReturns true if the given object is an instance of AlertCondition. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property conditionScope
public conditionScope: pulumi.Output<string | undefined>;application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.
property enabled
public enabled: pulumi.Output<boolean | undefined>;Whether the condition is enabled or not. Defaults to true.
property entities
public entities: pulumi.Output<number[]>;The instance IDs associated with this condition.
property gcMetric
public gcMetric: pulumi.Output<string | undefined>;A valid Garbage Collection metric e.g. GC/G1 Young Generation.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property metric
public metric: pulumi.Output<string>;The metric field accepts parameters based on the type set. One of these metrics based on type:
* apmAppMetric
* apdex
* errorPercentage
* responseTimeBackground
* responseTimeWeb
* throughputBackground
* throughputWeb
* userDefined
* apmKtMetric
* apdex
* errorCount
* errorPercentage
* responseTime
* throughput
* browserMetric
* ajaxResponseTime
* ajaxThroughput
* domProcessing
* endUserApdex
* network
* pageRendering
* pageViewThroughput
* pageViewsWithJsErrors
* requestQueuing
* totalPageLoad
* userDefined
* webApplication
* mobileMetric
* database
* images
* json
* mobileCrashRate
* networkErrorPercentage
* network
* statusErrorPercentage
* userDefined
* viewLoading
property name
public name: pulumi.Output<string>;The title of the condition. Must be between 1 and 64 characters, inclusive.
property policyId
public policyId: pulumi.Output<number>;The ID of the policy where this condition should be used.
property runbookUrl
public runbookUrl: pulumi.Output<string | undefined>;Runbook URL to display in notifications.
property terms
public terms: pulumi.Output<AlertConditionTerm[]>;A list of terms for this condition. See Terms below for details.
property type
public type: pulumi.Output<string>;The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property userDefinedMetric
public userDefinedMetric: pulumi.Output<string | undefined>;A custom metric to be evaluated.
property userDefinedValueFunction
public userDefinedValueFunction: pulumi.Output<string | undefined>;One of: average, min, max, total, or sampleSize.
property violationCloseTimer
public violationCloseTimer: pulumi.Output<number | undefined>;Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.
Resource AlertPolicy
class AlertPolicy extends CustomResourceUse this resource to create and manage New Relic alert policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertPolicy("foo", {
incidentPreference: "PER_POLICY", // PER_POLICY is default
});Additional Examples
Provision multiple notification channels and add those channels to a policy
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
// Provision a Slack notification channel.
const slackChannel = new newrelic.AlertChannel("slackChannel", {
type: "slack",
config: {
url: "https://hooks.slack.com/services/<*****>/<*****>",
channel: "example-alerts-channel",
},
});
// Provision an email notification channel.
const emailChannel = new newrelic.AlertChannel("emailChannel", {
type: "email",
config: {
recipients: "example@testing.com",
includeJsonAttachment: "1",
},
});
// Provision the alert policy.
const policyWithChannels = new newrelic.AlertPolicy("policyWithChannels", {
incidentPreference: "PER_CONDITION",
channelIds: [
slackChannel.id,
emailChannel.id,
],
});Reference existing notification channels and add those channel to a policy
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const slackChannel = newrelic.getAlertChannel({
name: "slack-channel-notification",
});
const emailChannel = newrelic.getAlertChannel({
name: "test@example.com",
});
// Provision the alert policy.
const policyWithChannels = new newrelic.AlertPolicy("policyWithChannels", {
incidentPreference: "PER_CONDITION",
channelIds: [
slackChannel.then(slackChannel => slackChannel.id),
emailChannel.then(emailChannel => emailChannel.id),
],
});constructor
new AlertPolicy(name: string, args?: AlertPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a AlertPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertPolicyState, opts?: pulumi.CustomResourceOptions): AlertPolicyGet an existing AlertPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AlertPolicyReturns true if the given object is an instance of AlertPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property channelIds
public channelIds: pulumi.Output<number[] | undefined>;An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.
property createdAt
public createdAt: pulumi.Output<string>;DEPRECATED: The time the policy was created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property incidentPreference
public incidentPreference: pulumi.Output<string | undefined>;The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
property name
public name: pulumi.Output<string>;The name of the policy.
property updatedAt
public updatedAt: pulumi.Output<string>;DEPRECATED: The time the policy was last updated.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource AlertPolicyChannel
class AlertPolicyChannel extends CustomResourceUse this resource to map alert policies to alert channels in New Relic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const examplePolicy = newrelic.getAlertPolicy({
name: "my-alert-policy",
});
// Creates an email alert channel.
const emailChannel = new newrelic.AlertChannel("emailChannel", {
type: "email",
config: {
recipients: "foo@example.com",
includeJsonAttachment: "1",
},
});
// Creates a Slack alert channel.
const slackChannel = new newrelic.AlertChannel("slackChannel", {
type: "slack",
config: {
channel: "#example-channel",
url: "http://example-org.slack.com",
},
});
// Applies the created channels above to the alert policy
// referenced at the top of the config.
const foo = new newrelic.AlertPolicyChannel("foo", {
policyId: newrelic_alert_policy.example_policy.id,
channelIds: [
emailChannel.id,
slackChannel.id,
],
});constructor
new AlertPolicyChannel(name: string, args: AlertPolicyChannelArgs, opts?: pulumi.CustomResourceOptions)Create a AlertPolicyChannel resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertPolicyChannelState, opts?: pulumi.CustomResourceOptions): AlertPolicyChannelGet an existing AlertPolicyChannel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is AlertPolicyChannelReturns true if the given object is an instance of AlertPolicyChannel. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property channelId
public channelId: pulumi.Output<number | undefined>;Deprecated. The ID of the channel. Please use the channel_ids argument instead.
property channelIds
public channelIds: pulumi.Output<number[] | undefined>;Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policyId
public policyId: pulumi.Output<number>;The ID of the policy.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Dashboard
class Dashboard extends CustomResourceconstructor
new Dashboard(name: string, args: DashboardArgs, opts?: pulumi.CustomResourceOptions)Create a Dashboard resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DashboardState, opts?: pulumi.CustomResourceOptions): DashboardGet an existing Dashboard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DashboardReturns true if the given object is an instance of Dashboard. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property dashboardUrl
public dashboardUrl: pulumi.Output<string>;The URL for viewing the dashboard.
property editable
public editable: pulumi.Output<string | undefined>;Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.
property filter
public filter: pulumi.Output<DashboardFilter | undefined>;A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.
property gridColumnCount
public gridColumnCount: pulumi.Output<number | undefined>;The number of columns to use when organizing and displaying widgets. New Relic One supports a 3 column grid and a 12 column grid. New Relic Insights supports a 3 column grid.
property icon
public icon: pulumi.Output<string | undefined>;The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property title
public title: pulumi.Output<string>;The title of the dashboard.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property visibility
public visibility: pulumi.Output<string | undefined>;Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.
property widgets
public widgets: pulumi.Output<DashboardWidget[] | undefined>;A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.
Resource InfraAlertCondition
class InfraAlertCondition extends CustomResourceUse this resource to create and manage Infrastructure alert conditions in New Relic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertPolicy("foo", {});
const highDiskUsage = new newrelic.InfraAlertCondition("highDiskUsage", {
policyId: foo.id,
type: "infraMetric",
event: "StorageSample",
select: "diskUsedPercent",
comparison: "above",
where: `(`hostname` LIKE '%frontend%')`,
critical: {
duration: 25,
value: 90,
timeFunction: "all",
},
warning: {
duration: 10,
value: 90,
timeFunction: "all",
},
});
const highDbConnCount = new newrelic.InfraAlertCondition("highDbConnCount", {
policyId: foo.id,
type: "infraMetric",
event: "DatastoreSample",
select: "provider.databaseConnections.Average",
comparison: "above",
where: `(`hostname` LIKE '%db%')`,
integrationProvider: "RdsDbInstance",
critical: {
duration: 25,
value: 90,
timeFunction: "all",
},
});
const processNotRunning = new newrelic.InfraAlertCondition("processNotRunning", {
policyId: foo.id,
type: "infraProcessRunning",
comparison: "equal",
processWhere: "`commandName` = '/usr/bin/ruby'",
critical: {
duration: 5,
value: 0,
},
});
const hostNotReporting = new newrelic.InfraAlertCondition("hostNotReporting", {
policyId: foo.id,
type: "infraHostNotReporting",
event: "StorageSample",
select: "diskUsedPercent",
where: `(`hostname` LIKE '%frontend%')`,
critical: {
duration: 5,
},
});Thresholds
The critical and warning threshold mapping supports the following arguments:
duration- (Required) Identifies the number of minutes the threshold must be passed or met for the alert to trigger. Threshold durations must be between 1 and 60 minutes (inclusive).value- (Optional) Threshold value, computed against thecomparisonoperator. Supported byinfraMetricandinfraProcessRunningalert condition types.timeFunction- (Optional) Indicates if the condition needs to be sustained or to just break the threshold once;allorany. Supported by theinfraMetricalert condition type.
constructor
new InfraAlertCondition(name: string, args: InfraAlertConditionArgs, opts?: pulumi.CustomResourceOptions)Create a InfraAlertCondition resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InfraAlertConditionState, opts?: pulumi.CustomResourceOptions): InfraAlertConditionGet an existing InfraAlertCondition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is InfraAlertConditionReturns true if the given object is an instance of InfraAlertCondition. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property comparison
public comparison: pulumi.Output<string | undefined>;The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.
property createdAt
public createdAt: pulumi.Output<number>;The timestamp the alert condition was created.
property critical
public critical: pulumi.Output<InfraAlertConditionCritical | undefined>;Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.
property enabled
public enabled: pulumi.Output<boolean | undefined>;Whether the condition is turned on or off. Valid values are true and false. Defaults to true.
property event
public event: pulumi.Output<string>;The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property integrationProvider
public integrationProvider: pulumi.Output<string | undefined>;For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.
property name
public name: pulumi.Output<string>;The Infrastructure alert condition’s name.
property policyId
public policyId: pulumi.Output<number>;The ID of the alert policy where this condition should be used.
property processWhere
public processWhere: pulumi.Output<string | undefined>;Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.
property runbookUrl
public runbookUrl: pulumi.Output<string | undefined>;Runbook URL to display in notifications.
property select
public select: pulumi.Output<string | undefined>;The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.
property type
public type: pulumi.Output<string>;The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.
property updatedAt
public updatedAt: pulumi.Output<number>;The timestamp the alert condition was last updated.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property violationCloseTimer
public violationCloseTimer: pulumi.Output<number | undefined>;Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.
property warning
public warning: pulumi.Output<InfraAlertConditionWarning | undefined>;Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.
property where
public where: pulumi.Output<string | undefined>;If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.
Resource NrqlAlertCondition
class NrqlAlertCondition extends CustomResourceUse 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 fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("fooNrqlAlertCondition", {
policyId: fooAlertPolicy.id,
type: "static",
runbookUrl: "https://www.example.com",
enabled: true,
term: [{
duration: 5,
operator: "below",
priority: "critical",
threshold: "1",
timeFunction: "all",
}],
nrql: {
query: "SELECT count(*) FROM SyntheticCheck WHERE monitorId = '<monitorId>'",
sinceValue: "3",
},
valueFunction: "singleValue",
});Terms
The term mapping supports the following arguments:
duration- (Required) In minutes, must be in the range of1to120, inclusive.operator- (Optional)above,below, orequal. Defaults toequal.priority- (Optional)criticalorwarning. Defaults tocritical.threshold- (Required) Must be 0 or greater.timeFunction- (Required)allorany.
NRQL
The nrql attribute supports the following arguments:
query- (Required) The NRQL query to execute for the condition.sinceValue- (Required) The value to be used in theSINCE <X> MINUTES AGOclause for the NRQL query. Must be between1and20.
Additional Examples
Type: outlier
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooNrqlAlertCondition = new newrelic.NrqlAlertCondition("fooNrqlAlertCondition", {
policyId: fooAlertPolicy.id,
runbookUrl: "https://bar.example.com",
enabled: true,
term: [{
duration: 10,
operator: "above",
priority: "critical",
threshold: "0.65",
timeFunction: "all",
}],
nrql: {
query: "SELECT percentile(duration, 99) FROM Transaction FACET remoteIp",
sinceValue: "3",
},
type: "outlier",
expectedGroups: 2,
ignoreOverlap: true,
});constructor
new NrqlAlertCondition(name: string, args: NrqlAlertConditionArgs, opts?: pulumi.CustomResourceOptions)Create a NrqlAlertCondition resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NrqlAlertConditionState, opts?: pulumi.CustomResourceOptions): NrqlAlertConditionGet an existing NrqlAlertCondition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is NrqlAlertConditionReturns true if the given object is an instance of NrqlAlertCondition. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property enabled
public enabled: pulumi.Output<boolean | undefined>;Whether to enable the alert condition.
property expectedGroups
public expectedGroups: pulumi.Output<number | undefined>;Number of expected groups when using outlier detection.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ignoreOverlap
public ignoreOverlap: pulumi.Output<boolean | undefined>;Whether to look for a convergence of groups when using outlier detection.
property name
public name: pulumi.Output<string>;The title of the condition.
property nrql
public nrql: pulumi.Output<NrqlAlertConditionNrql>;A NRQL query.
property policyId
public policyId: pulumi.Output<number>;The ID of the policy where this condition should be used.
property runbookUrl
public runbookUrl: pulumi.Output<string | undefined>;Runbook URL to display in notifications.
property terms
public terms: pulumi.Output<NrqlAlertConditionTerm[]>;A list of terms for this condition.
property type
public type: pulumi.Output<string | undefined>;property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property valueFunction
public valueFunction: pulumi.Output<string | undefined>;Possible values are single_value, sum.
property violationTimeLimitSeconds
public violationTimeLimitSeconds: pulumi.Output<number | undefined>;Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.
Resource Provider
class Provider extends ProviderResourceThe provider type for the newrelic package. By default, resources use package-wide configuration
settings, however an explicit Provider instance may be created and passed during resource
construction to achieve fine-grained programmatic control over provider settings. See the
documentation for more information.
constructor
new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)Create a Provider resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProviderReturns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method register
static register(provider: ProviderResource | undefined): Promise<string | undefined>property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getAlertChannel
getAlertChannel(args: GetAlertChannelArgs, opts?: pulumi.InvokeOptions): Promise<GetAlertChannelResult>Function getAlertPolicy
getAlertPolicy(args: GetAlertPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetAlertPolicyResult>Function getApplication
getApplication(args: GetApplicationArgs, opts?: pulumi.InvokeOptions): Promise<GetApplicationResult>Function getKeyTransaction
getKeyTransaction(args: GetKeyTransactionArgs, opts?: pulumi.InvokeOptions): Promise<GetKeyTransactionResult>Others
interface AlertChannelArgs
interface AlertChannelArgsThe set of arguments for constructing a AlertChannel resource.
property config
config?: pulumi.Input<AlertChannelConfig>;A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
property configuration
config block insteadconfiguration?: pulumi.Input<{[key: string]: any}>;Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.
property name
name?: pulumi.Input<string>;The name of the channel.
property type
type: pulumi.Input<string>;The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.
interface AlertChannelState
interface AlertChannelStateInput properties used for looking up and filtering AlertChannel resources.
property config
config?: pulumi.Input<AlertChannelConfig>;A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
property configuration
config block insteadconfiguration?: pulumi.Input<{[key: string]: any}>;Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.
property name
name?: pulumi.Input<string>;The name of the channel.
property type
type?: pulumi.Input<string>;The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.
interface AlertConditionArgs
interface AlertConditionArgsThe set of arguments for constructing a AlertCondition resource.
property conditionScope
conditionScope?: pulumi.Input<string>;application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.
property enabled
enabled?: pulumi.Input<boolean>;Whether the condition is enabled or not. Defaults to true.
property entities
entities: pulumi.Input<pulumi.Input<number>[]>;The instance IDs associated with this condition.
property gcMetric
gcMetric?: pulumi.Input<string>;A valid Garbage Collection metric e.g. GC/G1 Young Generation.
property metric
metric: pulumi.Input<string>;The metric field accepts parameters based on the type set. One of these metrics based on type:
* apmAppMetric
* apdex
* errorPercentage
* responseTimeBackground
* responseTimeWeb
* throughputBackground
* throughputWeb
* userDefined
* apmKtMetric
* apdex
* errorCount
* errorPercentage
* responseTime
* throughput
* browserMetric
* ajaxResponseTime
* ajaxThroughput
* domProcessing
* endUserApdex
* network
* pageRendering
* pageViewThroughput
* pageViewsWithJsErrors
* requestQueuing
* totalPageLoad
* userDefined
* webApplication
* mobileMetric
* database
* images
* json
* mobileCrashRate
* networkErrorPercentage
* network
* statusErrorPercentage
* userDefined
* viewLoading
property name
name?: pulumi.Input<string>;The title of the condition. Must be between 1 and 64 characters, inclusive.
property policyId
policyId: pulumi.Input<number>;The ID of the policy where this condition should be used.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property terms
terms: pulumi.Input<pulumi.Input<AlertConditionTerm>[]>;A list of terms for this condition. See Terms below for details.
property type
type: pulumi.Input<string>;The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric
property userDefinedMetric
userDefinedMetric?: pulumi.Input<string>;A custom metric to be evaluated.
property userDefinedValueFunction
userDefinedValueFunction?: pulumi.Input<string>;One of: average, min, max, total, or sampleSize.
property violationCloseTimer
violationCloseTimer?: pulumi.Input<number>;Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.
interface AlertConditionState
interface AlertConditionStateInput properties used for looking up and filtering AlertCondition resources.
property conditionScope
conditionScope?: pulumi.Input<string>;application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.
property enabled
enabled?: pulumi.Input<boolean>;Whether the condition is enabled or not. Defaults to true.
property entities
entities?: pulumi.Input<pulumi.Input<number>[]>;The instance IDs associated with this condition.
property gcMetric
gcMetric?: pulumi.Input<string>;A valid Garbage Collection metric e.g. GC/G1 Young Generation.
property metric
metric?: pulumi.Input<string>;The metric field accepts parameters based on the type set. One of these metrics based on type:
* apmAppMetric
* apdex
* errorPercentage
* responseTimeBackground
* responseTimeWeb
* throughputBackground
* throughputWeb
* userDefined
* apmKtMetric
* apdex
* errorCount
* errorPercentage
* responseTime
* throughput
* browserMetric
* ajaxResponseTime
* ajaxThroughput
* domProcessing
* endUserApdex
* network
* pageRendering
* pageViewThroughput
* pageViewsWithJsErrors
* requestQueuing
* totalPageLoad
* userDefined
* webApplication
* mobileMetric
* database
* images
* json
* mobileCrashRate
* networkErrorPercentage
* network
* statusErrorPercentage
* userDefined
* viewLoading
property name
name?: pulumi.Input<string>;The title of the condition. Must be between 1 and 64 characters, inclusive.
property policyId
policyId?: pulumi.Input<number>;The ID of the policy where this condition should be used.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property terms
terms?: pulumi.Input<pulumi.Input<AlertConditionTerm>[]>;A list of terms for this condition. See Terms below for details.
property type
type?: pulumi.Input<string>;The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric
property userDefinedMetric
userDefinedMetric?: pulumi.Input<string>;A custom metric to be evaluated.
property userDefinedValueFunction
userDefinedValueFunction?: pulumi.Input<string>;One of: average, min, max, total, or sampleSize.
property violationCloseTimer
violationCloseTimer?: pulumi.Input<number>;Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.
interface AlertPolicyArgs
interface AlertPolicyArgsThe set of arguments for constructing a AlertPolicy resource.
property channelIds
channelIds?: pulumi.Input<pulumi.Input<number>[]>;An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.
property incidentPreference
incidentPreference?: pulumi.Input<string>;The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
property name
name?: pulumi.Input<string>;The name of the policy.
interface AlertPolicyChannelArgs
interface AlertPolicyChannelArgsThe set of arguments for constructing a AlertPolicyChannel resource.
property channelId
channel_ids argument insteadchannelId?: pulumi.Input<number>;Deprecated. * The * ID * of * the * channel. * Please * use * the * channel_ids * argument * instead. *
property channelIds
channelIds?: pulumi.Input<pulumi.Input<number>[]>;Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.
property policyId
policyId: pulumi.Input<number>;The ID of the policy.
interface AlertPolicyChannelState
interface AlertPolicyChannelStateInput properties used for looking up and filtering AlertPolicyChannel resources.
property channelId
channel_ids argument insteadchannelId?: pulumi.Input<number>;Deprecated. * The * ID * of * the * channel. * Please * use * the * channel_ids * argument * instead. *
property channelIds
channelIds?: pulumi.Input<pulumi.Input<number>[]>;Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.
property policyId
policyId?: pulumi.Input<number>;The ID of the policy.
interface AlertPolicyState
interface AlertPolicyStateInput properties used for looking up and filtering AlertPolicy resources.
property channelIds
channelIds?: pulumi.Input<pulumi.Input<number>[]>;An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.
property createdAt
createdAt?: pulumi.Input<string>;DEPRECATED: The time the policy was created.
property incidentPreference
incidentPreference?: pulumi.Input<string>;The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
property name
name?: pulumi.Input<string>;The name of the policy.
property updatedAt
updatedAt?: pulumi.Input<string>;DEPRECATED: The time the policy was last updated.
interface DashboardArgs
interface DashboardArgsThe set of arguments for constructing a Dashboard resource.
property editable
editable?: pulumi.Input<string>;Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.
property filter
filter?: pulumi.Input<DashboardFilter>;A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.
property gridColumnCount
gridColumnCount?: pulumi.Input<number>;The number of columns to use when organizing and displaying widgets. New Relic One supports a 3 column grid and a 12 column grid. New Relic Insights supports a 3 column grid.
property icon
icon?: pulumi.Input<string>;The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.
property title
title: pulumi.Input<string>;The title of the dashboard.
property visibility
visibility?: pulumi.Input<string>;Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.
property widgets
widgets?: pulumi.Input<pulumi.Input<DashboardWidget>[]>;A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.
interface DashboardState
interface DashboardStateInput properties used for looking up and filtering Dashboard resources.
property dashboardUrl
dashboardUrl?: pulumi.Input<string>;The URL for viewing the dashboard.
property editable
editable?: pulumi.Input<string>;Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.
property filter
filter?: pulumi.Input<DashboardFilter>;A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.
property gridColumnCount
gridColumnCount?: pulumi.Input<number>;The number of columns to use when organizing and displaying widgets. New Relic One supports a 3 column grid and a 12 column grid. New Relic Insights supports a 3 column grid.
property icon
icon?: pulumi.Input<string>;The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.
property title
title?: pulumi.Input<string>;The title of the dashboard.
property visibility
visibility?: pulumi.Input<string>;Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.
property widgets
widgets?: pulumi.Input<pulumi.Input<DashboardWidget>[]>;A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.
interface GetAlertChannelArgs
interface GetAlertChannelArgsA collection of arguments for invoking getAlertChannel.
property name
name: string;The name of the alert channel in New Relic.
interface GetAlertChannelResult
interface GetAlertChannelResultA collection of values returned by getAlertChannel.
property config
config: GetAlertChannelConfig;Alert channel configuration.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;property policyIds
policyIds: number[];A list of policy IDs associated with the alert channel.
property type
type: string;Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.
interface GetAlertPolicyArgs
interface GetAlertPolicyArgsA collection of arguments for invoking getAlertPolicy.
property incidentPreference
incidentPreference?: undefined | string;The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
property name
name: string;The name of the alert policy in New Relic.
interface GetAlertPolicyResult
interface GetAlertPolicyResultA collection of values returned by getAlertPolicy.
property createdAt
createdAt: string;The time the policy was created.
property id
id: string;The provider-assigned unique ID for this managed resource.
property incidentPreference
incidentPreference?: undefined | string;The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
property name
name: string;property updatedAt
updatedAt: string;The time the policy was last updated.
interface GetApplicationArgs
interface GetApplicationArgsA collection of arguments for invoking getApplication.
property name
name: string;The name of the application in New Relic.
interface GetApplicationResult
interface GetApplicationResultA collection of values returned by getApplication.
property hostIds
hostIds: number[];A list of host IDs associated with the application.
property id
id: string;The provider-assigned unique ID for this managed resource.
property instanceIds
instanceIds: number[];A list of instance IDs associated with the application.
property name
name: string;function getEnv
getEnv(vars: string[]): string | undefinedfunction getEnvBoolean
getEnvBoolean(vars: string[]): boolean | undefinedfunction getEnvNumber
getEnvNumber(vars: string[]): number | undefinedinterface GetKeyTransactionArgs
interface GetKeyTransactionArgsA collection of arguments for invoking getKeyTransaction.
property name
name: string;The name of the key transaction in New Relic.
interface GetKeyTransactionResult
interface GetKeyTransactionResultA collection of values returned by getKeyTransaction.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;function getVersion
getVersion(): stringinterface InfraAlertConditionArgs
interface InfraAlertConditionArgsThe set of arguments for constructing a InfraAlertCondition resource.
property comparison
comparison?: pulumi.Input<string>;The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.
property critical
critical?: pulumi.Input<InfraAlertConditionCritical>;Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.
property enabled
enabled?: pulumi.Input<boolean>;Whether the condition is turned on or off. Valid values are true and false. Defaults to true.
property event
event?: pulumi.Input<string>;The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.
property integrationProvider
integrationProvider?: pulumi.Input<string>;For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.
property name
name?: pulumi.Input<string>;The Infrastructure alert condition’s name.
property policyId
policyId: pulumi.Input<number>;The ID of the alert policy where this condition should be used.
property processWhere
processWhere?: pulumi.Input<string>;Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property select
select?: pulumi.Input<string>;The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.
property type
type: pulumi.Input<string>;The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.
property violationCloseTimer
violationCloseTimer?: pulumi.Input<number>;Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.
property warning
warning?: pulumi.Input<InfraAlertConditionWarning>;Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.
property where
where?: pulumi.Input<string>;If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.
interface InfraAlertConditionState
interface InfraAlertConditionStateInput properties used for looking up and filtering InfraAlertCondition resources.
property comparison
comparison?: pulumi.Input<string>;The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.
property createdAt
createdAt?: pulumi.Input<number>;The timestamp the alert condition was created.
property critical
critical?: pulumi.Input<InfraAlertConditionCritical>;Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.
property enabled
enabled?: pulumi.Input<boolean>;Whether the condition is turned on or off. Valid values are true and false. Defaults to true.
property event
event?: pulumi.Input<string>;The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.
property integrationProvider
integrationProvider?: pulumi.Input<string>;For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.
property name
name?: pulumi.Input<string>;The Infrastructure alert condition’s name.
property policyId
policyId?: pulumi.Input<number>;The ID of the alert policy where this condition should be used.
property processWhere
processWhere?: pulumi.Input<string>;Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property select
select?: pulumi.Input<string>;The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.
property type
type?: pulumi.Input<string>;The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.
property updatedAt
updatedAt?: pulumi.Input<number>;The timestamp the alert condition was last updated.
property violationCloseTimer
violationCloseTimer?: pulumi.Input<number>;Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.
property warning
warning?: pulumi.Input<InfraAlertConditionWarning>;Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.
property where
where?: pulumi.Input<string>;If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.
interface NrqlAlertConditionArgs
interface NrqlAlertConditionArgsThe set of arguments for constructing a NrqlAlertCondition resource.
property enabled
enabled?: pulumi.Input<boolean>;Whether to enable the alert condition.
property expectedGroups
expectedGroups?: pulumi.Input<number>;Number of expected groups when using outlier detection.
property ignoreOverlap
ignoreOverlap?: pulumi.Input<boolean>;Whether to look for a convergence of groups when using outlier detection.
property name
name?: pulumi.Input<string>;The title of the condition.
property nrql
nrql: pulumi.Input<NrqlAlertConditionNrql>;A NRQL query.
property policyId
policyId: pulumi.Input<number>;The ID of the policy where this condition should be used.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property terms
terms: pulumi.Input<pulumi.Input<NrqlAlertConditionTerm>[]>;A list of terms for this condition.
property type
type?: pulumi.Input<string>;property valueFunction
valueFunction?: pulumi.Input<string>;Possible values are single_value, sum.
property violationTimeLimitSeconds
violationTimeLimitSeconds?: pulumi.Input<number>;Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.
interface NrqlAlertConditionState
interface NrqlAlertConditionStateInput properties used for looking up and filtering NrqlAlertCondition resources.
property enabled
enabled?: pulumi.Input<boolean>;Whether to enable the alert condition.
property expectedGroups
expectedGroups?: pulumi.Input<number>;Number of expected groups when using outlier detection.
property ignoreOverlap
ignoreOverlap?: pulumi.Input<boolean>;Whether to look for a convergence of groups when using outlier detection.
property name
name?: pulumi.Input<string>;The title of the condition.
property nrql
nrql?: pulumi.Input<NrqlAlertConditionNrql>;A NRQL query.
property policyId
policyId?: pulumi.Input<number>;The ID of the policy where this condition should be used.
property runbookUrl
runbookUrl?: pulumi.Input<string>;Runbook URL to display in notifications.
property terms
terms?: pulumi.Input<pulumi.Input<NrqlAlertConditionTerm>[]>;A list of terms for this condition.
property type
type?: pulumi.Input<string>;property valueFunction
valueFunction?: pulumi.Input<string>;Possible values are single_value, sum.
property violationTimeLimitSeconds
violationTimeLimitSeconds?: pulumi.Input<number>;Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.
interface ProviderArgs
interface ProviderArgsThe set of arguments for constructing a Provider resource.
property apiKey
apiKey?: pulumi.Input<string>;property apiUrl
apiUrl?: pulumi.Input<string>;property cacertFile
cacertFile?: pulumi.Input<string>;property infraApiUrl
infraApiUrl?: pulumi.Input<string>;property infrastructureApiUrl
infrastructureApiUrl?: pulumi.Input<string>;property insecureSkipVerify
insecureSkipVerify?: pulumi.Input<boolean>;property insightsAccountId
insightsAccountId?: pulumi.Input<string>;property insightsInsertKey
insightsInsertKey?: pulumi.Input<string>;property insightsInsertUrl
insightsInsertUrl?: pulumi.Input<string>;property insightsQueryKey
insightsQueryKey?: pulumi.Input<string>;property insightsQueryUrl
insightsQueryUrl?: pulumi.Input<string>;property nerdgraphApiUrl
nerdgraphApiUrl?: pulumi.Input<string>;property personalApiKey
personalApiKey?: pulumi.Input<string>;property syntheticsApiUrl
syntheticsApiUrl?: pulumi.Input<string>;