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 of5to120, inclusive.operator- (Optional)above,below, orequal. Defaults toequal.priority- (Optional)criticalorwarning. Defaults tocritical.threshold- (Required) Must be 0 or greater.time_function- (Required)allorany.
Create a AlertCondition Resource
new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);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);func NewAlertCondition(ctx *Context, name string, args AlertConditionArgs, opts ...ResourceOption) (*AlertCondition, error)public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions? opts = null)- 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.
- Metric
Description string The metric description.
- Plugin
Guid string The GUID of the plugin which produces the metric.
- Plugin
Id string The ID of the installed plugin instance which produces the metric.
- Policy
Id int The ID of the policy where this condition should be used.
- Terms
List<Pulumi.
New Relic. Plugins. Inputs. Alert Condition Term Args> A list of terms for this condition. See Terms below for details.
- Value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.- Enabled bool
Whether or not this condition is enabled.
- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- Entities []int
The plugin component IDs to target.
- Metric string
The plugin metric to evaluate.
- Metric
Description string The metric description.
- Plugin
Guid string The GUID of the plugin which produces the metric.
- Plugin
Id string The ID of the installed plugin instance which produces the metric.
- Policy
Id int The ID of the policy where this condition should be used.
- Terms
[]Alert
Condition Term A list of terms for this condition. See Terms below for details.
- Value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.- Enabled bool
Whether or not this condition is enabled.
- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- entities number[]
The plugin component IDs to target.
- metric string
The plugin metric to evaluate.
- metric
Description string The metric description.
- plugin
Guid string The GUID of the plugin which produces the metric.
- plugin
Id string The ID of the installed plugin instance which produces the metric.
- policy
Id number The ID of the policy where this condition should be used.
- terms
Alert
Condition Term[] A list of terms for this condition. See Terms below for details.
- value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.- enabled boolean
Whether or not this condition is enabled.
- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url 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[Alert
Condition Term] 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, orpercent.- 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:
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): AlertConditionstatic 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.
- Metric
Description string The metric description.
- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Plugin
Guid string The GUID of the plugin which produces the metric.
- Plugin
Id string The ID of the installed plugin instance which produces the metric.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- Terms
List<Pulumi.
New Relic. Plugins. Inputs. Alert Condition Term Args> A list of terms for this condition. See Terms below for details.
- Value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- Enabled bool
Whether or not this condition is enabled.
- Entities []int
The plugin component IDs to target.
- Metric string
The plugin metric to evaluate.
- Metric
Description string The metric description.
- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Plugin
Guid string The GUID of the plugin which produces the metric.
- Plugin
Id string The ID of the installed plugin instance which produces the metric.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- Terms
[]Alert
Condition Term A list of terms for this condition. See Terms below for details.
- Value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- enabled boolean
Whether or not this condition is enabled.
- entities number[]
The plugin component IDs to target.
- metric string
The plugin metric to evaluate.
- metric
Description string The metric description.
- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- plugin
Guid string The GUID of the plugin which produces the metric.
- plugin
Id string The ID of the installed plugin instance which produces the metric.
- policy
Id number The ID of the policy where this condition should be used.
- runbook
Url string Runbook URL to display in notifications.
- terms
Alert
Condition Term[] A list of terms for this condition. See Terms below for details.
- value
Function string The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- 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[Alert
Condition Term] 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, orpercent.
Supporting Types
AlertConditionTerm
Package Details
- Repository
- https://github.com/pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.