Class 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.
Inherited Members
Namespace: Pulumi.NewRelic
Assembly: Pulumi.NewRelic.dll
Syntax
public class AlertCondition : CustomResource
Constructors
View SourceAlertCondition(String, AlertConditionArgs, CustomResourceOptions)
Create a AlertCondition resource with the given unique name, arguments, and options.
Declaration
public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AlertConditionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceConditionScope
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.
Declaration
public Output<string> ConditionScope { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
Whether the condition is enabled or not. Defaults to true.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Entities
The instance IDs associated with this condition.
Declaration
public Output<ImmutableArray<int>> Entities { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.Int32>> |
GcMetric
A valid Garbage Collection metric e.g. GC/G1 Young Generation.
Declaration
public Output<string> GcMetric { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Metric
The metric field accepts parameters based on the type set. One of these metrics based on type:
apm_app_metricapdexerror_percentageresponse_time_backgroundresponse_time_webthroughput_backgroundthroughput_webuser_definedapm_kt_metricapdexerror_counterror_percentageresponse_timethroughputbrowser_metricajax_response_timeajax_throughputdom_processingend_user_apdexnetworkpage_renderingpage_view_throughputpage_views_with_js_errorsrequest_queuingtotal_page_loaduser_definedweb_applicationmobile_metricdatabaseimagesjsonmobile_crash_ratenetwork_error_percentagenetworkstatus_error_percentageuser_definedview_loading
Declaration
public Output<string> Metric { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The title of the condition. Must be between 1 and 64 characters, inclusive.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyId
The ID of the policy where this condition should be used.
Declaration
public Output<int> PolicyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
RunbookUrl
Runbook URL to display in notifications.
Declaration
public Output<string> RunbookUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Terms
A list of terms for this condition. See Terms below for details.
Declaration
public Output<ImmutableArray<AlertConditionTerm>> Terms { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<AlertConditionTerm>> |
Type
The type of condition. One of: apm_app_metric, apm_kt_metric, browser_metric, mobile_metric
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserDefinedMetric
A custom metric to be evaluated.
Declaration
public Output<string> UserDefinedMetric { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserDefinedValueFunction
One of: average, min, max, total, or sample_size.
Declaration
public Output<string> UserDefinedValueFunction { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ViolationCloseTimer
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.
Declaration
public Output<int?> ViolationCloseTimer { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Methods
View SourceGet(String, Input<String>, AlertConditionState, CustomResourceOptions)
Get an existing AlertCondition resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AlertCondition Get(string name, Input<string> id, AlertConditionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AlertConditionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AlertCondition |