AlertCondition
Use this resource to create and manage alert conditions for APM, Browser, and Mobile 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. Terms must include at least onecriticalpriority termthreshold- (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, condition_scope=None, enabled=None, entities=None, gc_metric=None, metric=None, name=None, policy_id=None, runbook_url=None, terms=None, type=None, user_defined_metric=None, user_defined_value_function=None, violation_close_timer=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 instance IDs associated with this condition.
- Metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- Policy
Id int The ID of the policy where this condition should be used.
- Terms
List<Pulumi.
New Relic. Inputs. Alert Condition Term Args> A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- Condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average,min,max,total, orsample_size.- Violation
Close intTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- Entities []int
The instance IDs associated with this condition.
- Metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- 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.
- Type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- Condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average,min,max,total, orsample_size.- Violation
Close intTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- entities number[]
The instance IDs associated with this condition.
- metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- 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.
- type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- enabled boolean
Whether the condition is enabled or not. Defaults to true.
- gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url string Runbook URL to display in notifications.
- user
Defined stringMetric A custom metric to be evaluated.
- user
Defined stringValue Function One of:
average,min,max,total, orsample_size.- violation
Close numberTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- entities List[Integer]
The instance IDs associated with this condition.
- metric str
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- 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.
- type str
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- condition_
scope str applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- enabled bool
Whether the condition is enabled or not. Defaults to true.
- gc_
metric str A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- name str
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook_
url str Runbook URL to display in notifications.
- user_
defined_ strmetric A custom metric to be evaluated.
- user_
defined_ strvalue_ function One of:
average,min,max,total, orsample_size.- violation_
close_ floattimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
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, condition_scope=None, enabled=None, entities=None, gc_metric=None, metric=None, name=None, policy_id=None, runbook_url=None, terms=None, type=None, user_defined_metric=None, user_defined_value_function=None, violation_close_timer=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:
- Condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Entities List<int>
The instance IDs associated with this condition.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- Metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- 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. Inputs. Alert Condition Term Args> A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average,min,max,total, orsample_size.- Violation
Close intTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- Condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Entities []int
The instance IDs associated with this condition.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- Metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- 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.
- Type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average,min,max,total, orsample_size.- Violation
Close intTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- condition
Scope string applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- enabled boolean
Whether the condition is enabled or not. Defaults to true.
- entities number[]
The instance IDs associated with this condition.
- gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- metric string
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- 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.
- type string
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- user
Defined stringMetric A custom metric to be evaluated.
- user
Defined stringValue Function One of:
average,min,max,total, orsample_size.- violation
Close numberTimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
- condition_
scope str applicationorinstance. Chooseapplicationfor most scenarios. If you are using the JVM plugin in New Relic, theinstancesetting allows your condition to trigger for specific app instances.- enabled bool
Whether the condition is enabled or not. Defaults to true.
- entities List[Integer]
The instance IDs associated with this condition.
- gc_
metric str A valid Garbage Collection metric e.g.
GC/G1 Young Generation.- metric str
The metric field accepts parameters based on the
typeset. One of these metrics based ontype: *apm_app_metric*apdex*error_percentage*response_time_background*response_time_web*throughput_background*throughput_web*user_defined*apm_kt_metric*apdex*error_count*error_percentage*response_time*throughput*browser_metric*ajax_response_time*ajax_throughput*dom_processing*end_user_apdex*network*page_rendering*page_view_throughput*page_views_with_js_errors*request_queuing*total_page_load*user_defined*web_application*mobile_metric*database*images*json*mobile_crash_rate*network_error_percentage*network*status_error_percentage*user_defined*view_loading- name str
The title of the condition. Must be between 1 and 64 characters, inclusive.
- 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.
- type str
The type of condition. One of:
apm_app_metric,apm_kt_metric,browser_metric,mobile_metric- user_
defined_ strmetric A custom metric to be evaluated.
- user_
defined_ strvalue_ function One of:
average,min,max,total, orsample_size.- violation_
close_ floattimer Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be:
1,2,4,8,12or24.
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.