AlertCondition

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

Terms

The term mapping supports the following arguments:

  • duration - (Required) In minutes, must be in the range of 5 to 120, inclusive.
  • operator - (Optional) above, below, or equal. Defaults to equal.
  • priority - (Optional) critical or warning. Defaults to critical.
  • threshold - (Required) Must be 0 or greater.
  • time_function - (Required) all or any.

Create a AlertCondition Resource

def AlertCondition(resource_name, opts=None, enabled=None, entities=None, metric=None, metric_description=None, name=None, plugin_guid=None, plugin_id=None, policy_id=None, runbook_url=None, terms=None, value_function=None, __props__=None);
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AlertCondition Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AlertCondition resource accepts the following input properties:

Entities List<int>

The plugin component IDs to target.

Metric string

The plugin metric to evaluate.

MetricDescription string

The metric description.

PluginGuid string

The GUID of the plugin which produces the metric.

PluginId string

The ID of the installed plugin instance which produces the metric.

PolicyId int

The ID of the policy where this condition should be used.

Terms List<Pulumi.NewRelic.Plugins.Inputs.AlertConditionTermArgs>

A list of terms for this condition. See Terms below for details.

ValueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

Enabled bool

Whether or not this condition is enabled.

Name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

RunbookUrl string

Runbook URL to display in notifications.

Entities []int

The plugin component IDs to target.

Metric string

The plugin metric to evaluate.

MetricDescription string

The metric description.

PluginGuid string

The GUID of the plugin which produces the metric.

PluginId string

The ID of the installed plugin instance which produces the metric.

PolicyId int

The ID of the policy where this condition should be used.

Terms []AlertConditionTerm

A list of terms for this condition. See Terms below for details.

ValueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

Enabled bool

Whether or not this condition is enabled.

Name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

RunbookUrl string

Runbook URL to display in notifications.

entities number[]

The plugin component IDs to target.

metric string

The plugin metric to evaluate.

metricDescription string

The metric description.

pluginGuid string

The GUID of the plugin which produces the metric.

pluginId string

The ID of the installed plugin instance which produces the metric.

policyId number

The ID of the policy where this condition should be used.

terms AlertConditionTerm[]

A list of terms for this condition. See Terms below for details.

valueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

enabled boolean

Whether or not this condition is enabled.

name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

runbookUrl string

Runbook URL to display in notifications.

entities List[Integer]

The plugin component IDs to target.

metric str

The plugin metric to evaluate.

metric_description str

The metric description.

plugin_guid str

The GUID of the plugin which produces the metric.

plugin_id str

The ID of the installed plugin instance which produces the metric.

policy_id float

The ID of the policy where this condition should be used.

terms List[AlertConditionTerm]

A list of terms for this condition. See Terms below for details.

value_function str

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

enabled bool

Whether or not this condition is enabled.

name str

The title of the condition. Must be between 1 and 64 characters, inclusive.

runbook_url str

Runbook URL to display in notifications.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AlertCondition Resource

Get an existing AlertCondition 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?: AlertConditionState, opts?: CustomResourceOptions): AlertCondition
static get(resource_name, id, opts=None, enabled=None, entities=None, metric=None, metric_description=None, name=None, plugin_guid=None, plugin_id=None, policy_id=None, runbook_url=None, terms=None, value_function=None, __props__=None);
func GetAlertCondition(ctx *Context, name string, id IDInput, state *AlertConditionState, opts ...ResourceOption) (*AlertCondition, error)
public static AlertCondition Get(string name, Input<string> id, AlertConditionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Enabled bool

Whether or not this condition is enabled.

Entities List<int>

The plugin component IDs to target.

Metric string

The plugin metric to evaluate.

MetricDescription string

The metric description.

Name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

PluginGuid string

The GUID of the plugin which produces the metric.

PluginId string

The ID of the installed plugin instance which produces the metric.

PolicyId int

The ID of the policy where this condition should be used.

RunbookUrl string

Runbook URL to display in notifications.

Terms List<Pulumi.NewRelic.Plugins.Inputs.AlertConditionTermArgs>

A list of terms for this condition. See Terms below for details.

ValueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

Enabled bool

Whether or not this condition is enabled.

Entities []int

The plugin component IDs to target.

Metric string

The plugin metric to evaluate.

MetricDescription string

The metric description.

Name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

PluginGuid string

The GUID of the plugin which produces the metric.

PluginId string

The ID of the installed plugin instance which produces the metric.

PolicyId int

The ID of the policy where this condition should be used.

RunbookUrl string

Runbook URL to display in notifications.

Terms []AlertConditionTerm

A list of terms for this condition. See Terms below for details.

ValueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

enabled boolean

Whether or not this condition is enabled.

entities number[]

The plugin component IDs to target.

metric string

The plugin metric to evaluate.

metricDescription string

The metric description.

name string

The title of the condition. Must be between 1 and 64 characters, inclusive.

pluginGuid string

The GUID of the plugin which produces the metric.

pluginId string

The ID of the installed plugin instance which produces the metric.

policyId number

The ID of the policy where this condition should be used.

runbookUrl string

Runbook URL to display in notifications.

terms AlertConditionTerm[]

A list of terms for this condition. See Terms below for details.

valueFunction string

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

enabled bool

Whether or not this condition is enabled.

entities List[Integer]

The plugin component IDs to target.

metric str

The plugin metric to evaluate.

metric_description str

The metric description.

name str

The title of the condition. Must be between 1 and 64 characters, inclusive.

plugin_guid str

The GUID of the plugin which produces the metric.

plugin_id str

The ID of the installed plugin instance which produces the metric.

policy_id float

The ID of the policy where this condition should be used.

runbook_url str

Runbook URL to display in notifications.

terms List[AlertConditionTerm]

A list of terms for this condition. See Terms below for details.

value_function str

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

Supporting Types

AlertConditionTerm

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Duration int
Threshold double
TimeFunction string
Operator string
Priority string
Duration int
Threshold float64
TimeFunction string
Operator string
Priority string
duration number
threshold number
timeFunction string
operator string
priority string
duration float
threshold float
timeFunction str
operator str
priority str

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.