pulumi-newrelic 5.16.0a1698964311__py3-none-any.whl → 5.58.0a1763707205__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-newrelic might be problematic. Click here for more details.
- pulumi_newrelic/__init__.py +58 -1
- pulumi_newrelic/_inputs.py +10772 -2775
- pulumi_newrelic/_utilities.py +92 -11
- pulumi_newrelic/account_management.py +56 -42
- pulumi_newrelic/alert_channel.py +177 -151
- pulumi_newrelic/alert_condition.py +313 -301
- pulumi_newrelic/alert_muting_rule.py +195 -138
- pulumi_newrelic/alert_policy.py +157 -109
- pulumi_newrelic/alert_policy_channel.py +95 -81
- pulumi_newrelic/api_access_key.py +191 -209
- pulumi_newrelic/browser_application.py +161 -153
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2710
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
- pulumi_newrelic/cloud/aws_integrations.py +518 -1490
- pulumi_newrelic/cloud/aws_link_account.py +88 -76
- pulumi_newrelic/cloud/azure_integrations.py +681 -587
- pulumi_newrelic/cloud/azure_link_account.py +129 -117
- pulumi_newrelic/cloud/gcp_integrations.py +436 -408
- pulumi_newrelic/cloud/gcp_link_account.py +71 -59
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2317
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +45 -0
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +129 -117
- pulumi_newrelic/entity_tags.py +153 -31
- pulumi_newrelic/events_to_metrics_rule.py +114 -102
- pulumi_newrelic/get_account.py +41 -29
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +83 -34
- pulumi_newrelic/get_application.py +51 -39
- pulumi_newrelic/get_authentication_domain.py +111 -0
- pulumi_newrelic/get_cloud_account.py +43 -31
- pulumi_newrelic/get_entity.py +126 -121
- pulumi_newrelic/get_group.py +190 -0
- pulumi_newrelic/get_key_transaction.py +117 -38
- pulumi_newrelic/get_notification_destination.py +86 -36
- pulumi_newrelic/get_obfuscation_expression.py +47 -35
- pulumi_newrelic/get_service_level_alert_helper.py +237 -137
- pulumi_newrelic/get_test_grok_pattern.py +47 -32
- pulumi_newrelic/get_user.py +165 -0
- pulumi_newrelic/group.py +286 -0
- pulumi_newrelic/infra_alert_condition.py +400 -382
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +94 -23
- pulumi_newrelic/insights/event.py +56 -48
- pulumi_newrelic/insights/outputs.py +51 -18
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +169 -153
- pulumi_newrelic/monitor_downtime.py +914 -0
- pulumi_newrelic/notification_channel.py +560 -418
- pulumi_newrelic/notification_destination.py +379 -124
- pulumi_newrelic/nrql_alert_condition.py +945 -513
- pulumi_newrelic/nrql_drop_rule.py +121 -129
- pulumi_newrelic/obfuscation_expression.py +88 -76
- pulumi_newrelic/obfuscation_rule.py +123 -109
- pulumi_newrelic/one_dashboard.py +118 -108
- pulumi_newrelic/one_dashboard_json.py +77 -67
- pulumi_newrelic/one_dashboard_raw.py +214 -202
- pulumi_newrelic/outputs.py +5491 -2141
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +520 -90
- pulumi_newrelic/plugins/application_settings.py +463 -167
- pulumi_newrelic/plugins/outputs.py +337 -75
- pulumi_newrelic/plugins/workload.py +387 -151
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +277 -255
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +275 -106
- pulumi_newrelic/synthetics/alert_condition.py +174 -160
- pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
- pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
- pulumi_newrelic/synthetics/get_private_location.py +51 -39
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
- pulumi_newrelic/synthetics/monitor.py +668 -462
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
- pulumi_newrelic/synthetics/outputs.py +102 -85
- pulumi_newrelic/synthetics/private_location.py +120 -110
- pulumi_newrelic/synthetics/script_monitor.py +623 -375
- pulumi_newrelic/synthetics/secure_credential.py +99 -93
- pulumi_newrelic/synthetics/step_monitor.py +545 -201
- pulumi_newrelic/user.py +366 -0
- pulumi_newrelic/workflow.py +348 -312
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -17,57 +22,65 @@ __all__ = ['NrqlAlertConditionArgs', 'NrqlAlertCondition']
|
|
|
17
22
|
class NrqlAlertConditionArgs:
|
|
18
23
|
def __init__(__self__, *,
|
|
19
24
|
nrql: pulumi.Input['NrqlAlertConditionNrqlArgs'],
|
|
20
|
-
policy_id: pulumi.Input[
|
|
21
|
-
account_id: Optional[pulumi.Input[
|
|
22
|
-
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
|
23
|
-
aggregation_method: Optional[pulumi.Input[str]] = None,
|
|
24
|
-
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
|
25
|
-
aggregation_window: Optional[pulumi.Input[int]] = None,
|
|
26
|
-
baseline_direction: Optional[pulumi.Input[str]] = None,
|
|
27
|
-
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
25
|
+
policy_id: pulumi.Input[_builtins.str],
|
|
26
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
27
|
+
aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
|
|
28
|
+
aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
|
|
29
|
+
aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
|
|
30
|
+
aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
|
|
31
|
+
baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
|
|
32
|
+
close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
28
33
|
critical: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']] = None,
|
|
29
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
30
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
31
|
-
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
|
32
|
-
expiration_duration: Optional[pulumi.Input[int]] = None,
|
|
33
|
-
fill_option: Optional[pulumi.Input[str]] = None,
|
|
34
|
-
fill_value: Optional[pulumi.Input[float]] = None,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
35
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
36
|
+
evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
|
|
37
|
+
expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
|
|
38
|
+
fill_option: Optional[pulumi.Input[_builtins.str]] = None,
|
|
39
|
+
fill_value: Optional[pulumi.Input[_builtins.float]] = None,
|
|
40
|
+
ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
41
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
42
|
+
open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
43
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
44
|
+
signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
|
|
45
|
+
slide_by: Optional[pulumi.Input[_builtins.int]] = None,
|
|
46
|
+
target_entity: Optional[pulumi.Input[_builtins.str]] = None,
|
|
39
47
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
title_template: Optional[pulumi.Input[_builtins.str]] = None,
|
|
49
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
50
|
+
violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
|
|
51
|
+
violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
|
|
43
52
|
warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
|
|
44
53
|
"""
|
|
45
54
|
The set of arguments for constructing a NrqlAlertCondition resource.
|
|
46
55
|
:param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
|
|
47
|
-
:param pulumi.Input[
|
|
48
|
-
:param pulumi.Input[
|
|
49
|
-
:param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
50
|
-
:param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
51
|
-
:param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
52
|
-
:param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
53
|
-
:param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
54
|
-
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
56
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
57
|
+
:param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
58
|
+
:param pulumi.Input[_builtins.str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
59
|
+
:param pulumi.Input[_builtins.str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
60
|
+
:param pulumi.Input[_builtins.str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
61
|
+
:param pulumi.Input[_builtins.int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
62
|
+
:param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
63
|
+
:param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
55
64
|
:param pulumi.Input['NrqlAlertConditionCriticalArgs'] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
56
|
-
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
|
57
|
-
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
58
|
-
:param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
59
|
-
:param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
60
|
-
:param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
61
|
-
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
|
62
|
-
:param pulumi.Input[
|
|
63
|
-
:param pulumi.Input[
|
|
64
|
-
:param pulumi.Input[
|
|
65
|
-
:param pulumi.Input[
|
|
65
|
+
:param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
|
|
66
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
67
|
+
:param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
68
|
+
:param pulumi.Input[_builtins.int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
69
|
+
:param pulumi.Input[_builtins.str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
70
|
+
:param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
|
|
71
|
+
:param pulumi.Input[_builtins.bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
72
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition.
|
|
73
|
+
:param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
|
74
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
75
|
+
:param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
76
|
+
:param pulumi.Input[_builtins.int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
77
|
+
:param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
66
78
|
:param pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
67
|
-
:param pulumi.Input[str]
|
|
68
|
-
:param pulumi.Input[str]
|
|
79
|
+
:param pulumi.Input[_builtins.str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
80
|
+
:param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
81
|
+
:param pulumi.Input[_builtins.str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
69
82
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
70
|
-
:param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
83
|
+
:param pulumi.Input[_builtins.int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
71
84
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
72
85
|
:param pulumi.Input['NrqlAlertConditionWarningArgs'] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
73
86
|
"""
|
|
@@ -101,19 +114,27 @@ class NrqlAlertConditionArgs:
|
|
|
101
114
|
pulumi.set(__self__, "fill_option", fill_option)
|
|
102
115
|
if fill_value is not None:
|
|
103
116
|
pulumi.set(__self__, "fill_value", fill_value)
|
|
117
|
+
if ignore_on_expected_termination is not None:
|
|
118
|
+
pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
|
|
104
119
|
if name is not None:
|
|
105
120
|
pulumi.set(__self__, "name", name)
|
|
106
121
|
if open_violation_on_expiration is not None:
|
|
107
122
|
pulumi.set(__self__, "open_violation_on_expiration", open_violation_on_expiration)
|
|
108
123
|
if runbook_url is not None:
|
|
109
124
|
pulumi.set(__self__, "runbook_url", runbook_url)
|
|
125
|
+
if signal_seasonality is not None:
|
|
126
|
+
pulumi.set(__self__, "signal_seasonality", signal_seasonality)
|
|
110
127
|
if slide_by is not None:
|
|
111
128
|
pulumi.set(__self__, "slide_by", slide_by)
|
|
129
|
+
if target_entity is not None:
|
|
130
|
+
pulumi.set(__self__, "target_entity", target_entity)
|
|
112
131
|
if terms is not None:
|
|
113
132
|
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
|
114
133
|
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
|
115
134
|
if terms is not None:
|
|
116
135
|
pulumi.set(__self__, "terms", terms)
|
|
136
|
+
if title_template is not None:
|
|
137
|
+
pulumi.set(__self__, "title_template", title_template)
|
|
117
138
|
if type is not None:
|
|
118
139
|
pulumi.set(__self__, "type", type)
|
|
119
140
|
if violation_time_limit is not None:
|
|
@@ -126,7 +147,7 @@ class NrqlAlertConditionArgs:
|
|
|
126
147
|
if warning is not None:
|
|
127
148
|
pulumi.set(__self__, "warning", warning)
|
|
128
149
|
|
|
129
|
-
@property
|
|
150
|
+
@_builtins.property
|
|
130
151
|
@pulumi.getter
|
|
131
152
|
def nrql(self) -> pulumi.Input['NrqlAlertConditionNrqlArgs']:
|
|
132
153
|
"""
|
|
@@ -138,103 +159,103 @@ class NrqlAlertConditionArgs:
|
|
|
138
159
|
def nrql(self, value: pulumi.Input['NrqlAlertConditionNrqlArgs']):
|
|
139
160
|
pulumi.set(self, "nrql", value)
|
|
140
161
|
|
|
141
|
-
@property
|
|
162
|
+
@_builtins.property
|
|
142
163
|
@pulumi.getter(name="policyId")
|
|
143
|
-
def policy_id(self) -> pulumi.Input[
|
|
164
|
+
def policy_id(self) -> pulumi.Input[_builtins.str]:
|
|
144
165
|
"""
|
|
145
166
|
The ID of the policy where this condition should be used.
|
|
146
167
|
"""
|
|
147
168
|
return pulumi.get(self, "policy_id")
|
|
148
169
|
|
|
149
170
|
@policy_id.setter
|
|
150
|
-
def policy_id(self, value: pulumi.Input[
|
|
171
|
+
def policy_id(self, value: pulumi.Input[_builtins.str]):
|
|
151
172
|
pulumi.set(self, "policy_id", value)
|
|
152
173
|
|
|
153
|
-
@property
|
|
174
|
+
@_builtins.property
|
|
154
175
|
@pulumi.getter(name="accountId")
|
|
155
|
-
def account_id(self) -> Optional[pulumi.Input[
|
|
176
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
156
177
|
"""
|
|
157
178
|
The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
158
179
|
"""
|
|
159
180
|
return pulumi.get(self, "account_id")
|
|
160
181
|
|
|
161
182
|
@account_id.setter
|
|
162
|
-
def account_id(self, value: Optional[pulumi.Input[
|
|
183
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
163
184
|
pulumi.set(self, "account_id", value)
|
|
164
185
|
|
|
165
|
-
@property
|
|
186
|
+
@_builtins.property
|
|
166
187
|
@pulumi.getter(name="aggregationDelay")
|
|
167
|
-
def aggregation_delay(self) -> Optional[pulumi.Input[str]]:
|
|
188
|
+
def aggregation_delay(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
168
189
|
"""
|
|
169
190
|
How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
170
191
|
"""
|
|
171
192
|
return pulumi.get(self, "aggregation_delay")
|
|
172
193
|
|
|
173
194
|
@aggregation_delay.setter
|
|
174
|
-
def aggregation_delay(self, value: Optional[pulumi.Input[str]]):
|
|
195
|
+
def aggregation_delay(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
175
196
|
pulumi.set(self, "aggregation_delay", value)
|
|
176
197
|
|
|
177
|
-
@property
|
|
198
|
+
@_builtins.property
|
|
178
199
|
@pulumi.getter(name="aggregationMethod")
|
|
179
|
-
def aggregation_method(self) -> Optional[pulumi.Input[str]]:
|
|
200
|
+
def aggregation_method(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
180
201
|
"""
|
|
181
202
|
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
182
203
|
"""
|
|
183
204
|
return pulumi.get(self, "aggregation_method")
|
|
184
205
|
|
|
185
206
|
@aggregation_method.setter
|
|
186
|
-
def aggregation_method(self, value: Optional[pulumi.Input[str]]):
|
|
207
|
+
def aggregation_method(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
187
208
|
pulumi.set(self, "aggregation_method", value)
|
|
188
209
|
|
|
189
|
-
@property
|
|
210
|
+
@_builtins.property
|
|
190
211
|
@pulumi.getter(name="aggregationTimer")
|
|
191
|
-
def aggregation_timer(self) -> Optional[pulumi.Input[str]]:
|
|
212
|
+
def aggregation_timer(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
192
213
|
"""
|
|
193
214
|
How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
194
215
|
"""
|
|
195
216
|
return pulumi.get(self, "aggregation_timer")
|
|
196
217
|
|
|
197
218
|
@aggregation_timer.setter
|
|
198
|
-
def aggregation_timer(self, value: Optional[pulumi.Input[str]]):
|
|
219
|
+
def aggregation_timer(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
199
220
|
pulumi.set(self, "aggregation_timer", value)
|
|
200
221
|
|
|
201
|
-
@property
|
|
222
|
+
@_builtins.property
|
|
202
223
|
@pulumi.getter(name="aggregationWindow")
|
|
203
|
-
def aggregation_window(self) -> Optional[pulumi.Input[int]]:
|
|
224
|
+
def aggregation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
204
225
|
"""
|
|
205
|
-
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
226
|
+
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
206
227
|
"""
|
|
207
228
|
return pulumi.get(self, "aggregation_window")
|
|
208
229
|
|
|
209
230
|
@aggregation_window.setter
|
|
210
|
-
def aggregation_window(self, value: Optional[pulumi.Input[int]]):
|
|
231
|
+
def aggregation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
211
232
|
pulumi.set(self, "aggregation_window", value)
|
|
212
233
|
|
|
213
|
-
@property
|
|
234
|
+
@_builtins.property
|
|
214
235
|
@pulumi.getter(name="baselineDirection")
|
|
215
|
-
def baseline_direction(self) -> Optional[pulumi.Input[str]]:
|
|
236
|
+
def baseline_direction(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
216
237
|
"""
|
|
217
238
|
The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
218
239
|
"""
|
|
219
240
|
return pulumi.get(self, "baseline_direction")
|
|
220
241
|
|
|
221
242
|
@baseline_direction.setter
|
|
222
|
-
def baseline_direction(self, value: Optional[pulumi.Input[str]]):
|
|
243
|
+
def baseline_direction(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
223
244
|
pulumi.set(self, "baseline_direction", value)
|
|
224
245
|
|
|
225
|
-
@property
|
|
246
|
+
@_builtins.property
|
|
226
247
|
@pulumi.getter(name="closeViolationsOnExpiration")
|
|
227
|
-
def close_violations_on_expiration(self) -> Optional[pulumi.Input[bool]]:
|
|
248
|
+
def close_violations_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
228
249
|
"""
|
|
229
250
|
Whether to close all open incidents when the signal expires.
|
|
230
251
|
"""
|
|
231
252
|
return pulumi.get(self, "close_violations_on_expiration")
|
|
232
253
|
|
|
233
254
|
@close_violations_on_expiration.setter
|
|
234
|
-
def close_violations_on_expiration(self, value: Optional[pulumi.Input[bool]]):
|
|
255
|
+
def close_violations_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
235
256
|
pulumi.set(self, "close_violations_on_expiration", value)
|
|
236
257
|
|
|
237
|
-
@property
|
|
258
|
+
@_builtins.property
|
|
238
259
|
@pulumi.getter
|
|
239
260
|
def critical(self) -> Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]:
|
|
240
261
|
"""
|
|
@@ -246,172 +267,216 @@ class NrqlAlertConditionArgs:
|
|
|
246
267
|
def critical(self, value: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]):
|
|
247
268
|
pulumi.set(self, "critical", value)
|
|
248
269
|
|
|
249
|
-
@property
|
|
270
|
+
@_builtins.property
|
|
250
271
|
@pulumi.getter
|
|
251
|
-
def description(self) -> Optional[pulumi.Input[str]]:
|
|
272
|
+
def description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
252
273
|
"""
|
|
253
274
|
The description of the NRQL alert condition.
|
|
254
275
|
"""
|
|
255
276
|
return pulumi.get(self, "description")
|
|
256
277
|
|
|
257
278
|
@description.setter
|
|
258
|
-
def description(self, value: Optional[pulumi.Input[str]]):
|
|
279
|
+
def description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
259
280
|
pulumi.set(self, "description", value)
|
|
260
281
|
|
|
261
|
-
@property
|
|
282
|
+
@_builtins.property
|
|
262
283
|
@pulumi.getter
|
|
263
|
-
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
284
|
+
def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
264
285
|
"""
|
|
265
286
|
Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
266
287
|
"""
|
|
267
288
|
return pulumi.get(self, "enabled")
|
|
268
289
|
|
|
269
290
|
@enabled.setter
|
|
270
|
-
def enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
291
|
+
def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
271
292
|
pulumi.set(self, "enabled", value)
|
|
272
293
|
|
|
273
|
-
@property
|
|
294
|
+
@_builtins.property
|
|
274
295
|
@pulumi.getter(name="evaluationDelay")
|
|
275
|
-
def evaluation_delay(self) -> Optional[pulumi.Input[int]]:
|
|
296
|
+
def evaluation_delay(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
276
297
|
"""
|
|
277
298
|
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
278
299
|
"""
|
|
279
300
|
return pulumi.get(self, "evaluation_delay")
|
|
280
301
|
|
|
281
302
|
@evaluation_delay.setter
|
|
282
|
-
def evaluation_delay(self, value: Optional[pulumi.Input[int]]):
|
|
303
|
+
def evaluation_delay(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
283
304
|
pulumi.set(self, "evaluation_delay", value)
|
|
284
305
|
|
|
285
|
-
@property
|
|
306
|
+
@_builtins.property
|
|
286
307
|
@pulumi.getter(name="expirationDuration")
|
|
287
|
-
def expiration_duration(self) -> Optional[pulumi.Input[int]]:
|
|
308
|
+
def expiration_duration(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
288
309
|
"""
|
|
289
310
|
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
290
311
|
"""
|
|
291
312
|
return pulumi.get(self, "expiration_duration")
|
|
292
313
|
|
|
293
314
|
@expiration_duration.setter
|
|
294
|
-
def expiration_duration(self, value: Optional[pulumi.Input[int]]):
|
|
315
|
+
def expiration_duration(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
295
316
|
pulumi.set(self, "expiration_duration", value)
|
|
296
317
|
|
|
297
|
-
@property
|
|
318
|
+
@_builtins.property
|
|
298
319
|
@pulumi.getter(name="fillOption")
|
|
299
|
-
def fill_option(self) -> Optional[pulumi.Input[str]]:
|
|
320
|
+
def fill_option(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
300
321
|
"""
|
|
301
322
|
Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
302
323
|
"""
|
|
303
324
|
return pulumi.get(self, "fill_option")
|
|
304
325
|
|
|
305
326
|
@fill_option.setter
|
|
306
|
-
def fill_option(self, value: Optional[pulumi.Input[str]]):
|
|
327
|
+
def fill_option(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
307
328
|
pulumi.set(self, "fill_option", value)
|
|
308
329
|
|
|
309
|
-
@property
|
|
330
|
+
@_builtins.property
|
|
310
331
|
@pulumi.getter(name="fillValue")
|
|
311
|
-
def fill_value(self) -> Optional[pulumi.Input[float]]:
|
|
332
|
+
def fill_value(self) -> Optional[pulumi.Input[_builtins.float]]:
|
|
312
333
|
"""
|
|
313
334
|
This value will be used for filling gaps in the signal.
|
|
314
335
|
"""
|
|
315
336
|
return pulumi.get(self, "fill_value")
|
|
316
337
|
|
|
317
338
|
@fill_value.setter
|
|
318
|
-
def fill_value(self, value: Optional[pulumi.Input[float]]):
|
|
339
|
+
def fill_value(self, value: Optional[pulumi.Input[_builtins.float]]):
|
|
319
340
|
pulumi.set(self, "fill_value", value)
|
|
320
341
|
|
|
321
|
-
@property
|
|
342
|
+
@_builtins.property
|
|
343
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
|
344
|
+
def ignore_on_expected_termination(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
345
|
+
"""
|
|
346
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
347
|
+
"""
|
|
348
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
|
349
|
+
|
|
350
|
+
@ignore_on_expected_termination.setter
|
|
351
|
+
def ignore_on_expected_termination(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
352
|
+
pulumi.set(self, "ignore_on_expected_termination", value)
|
|
353
|
+
|
|
354
|
+
@_builtins.property
|
|
322
355
|
@pulumi.getter
|
|
323
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
356
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
324
357
|
"""
|
|
325
358
|
The title of the condition.
|
|
326
359
|
"""
|
|
327
360
|
return pulumi.get(self, "name")
|
|
328
361
|
|
|
329
362
|
@name.setter
|
|
330
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
363
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
331
364
|
pulumi.set(self, "name", value)
|
|
332
365
|
|
|
333
|
-
@property
|
|
366
|
+
@_builtins.property
|
|
334
367
|
@pulumi.getter(name="openViolationOnExpiration")
|
|
335
|
-
def open_violation_on_expiration(self) -> Optional[pulumi.Input[bool]]:
|
|
368
|
+
def open_violation_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
336
369
|
"""
|
|
337
370
|
Whether to create a new incident to capture that the signal expired.
|
|
338
371
|
"""
|
|
339
372
|
return pulumi.get(self, "open_violation_on_expiration")
|
|
340
373
|
|
|
341
374
|
@open_violation_on_expiration.setter
|
|
342
|
-
def open_violation_on_expiration(self, value: Optional[pulumi.Input[bool]]):
|
|
375
|
+
def open_violation_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
343
376
|
pulumi.set(self, "open_violation_on_expiration", value)
|
|
344
377
|
|
|
345
|
-
@property
|
|
378
|
+
@_builtins.property
|
|
346
379
|
@pulumi.getter(name="runbookUrl")
|
|
347
|
-
def runbook_url(self) -> Optional[pulumi.Input[str]]:
|
|
380
|
+
def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
348
381
|
"""
|
|
349
382
|
Runbook URL to display in notifications.
|
|
350
383
|
"""
|
|
351
384
|
return pulumi.get(self, "runbook_url")
|
|
352
385
|
|
|
353
386
|
@runbook_url.setter
|
|
354
|
-
def runbook_url(self, value: Optional[pulumi.Input[str]]):
|
|
387
|
+
def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
355
388
|
pulumi.set(self, "runbook_url", value)
|
|
356
389
|
|
|
357
|
-
@property
|
|
390
|
+
@_builtins.property
|
|
391
|
+
@pulumi.getter(name="signalSeasonality")
|
|
392
|
+
def signal_seasonality(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
393
|
+
"""
|
|
394
|
+
Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
395
|
+
"""
|
|
396
|
+
return pulumi.get(self, "signal_seasonality")
|
|
397
|
+
|
|
398
|
+
@signal_seasonality.setter
|
|
399
|
+
def signal_seasonality(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
400
|
+
pulumi.set(self, "signal_seasonality", value)
|
|
401
|
+
|
|
402
|
+
@_builtins.property
|
|
358
403
|
@pulumi.getter(name="slideBy")
|
|
359
|
-
def slide_by(self) -> Optional[pulumi.Input[int]]:
|
|
404
|
+
def slide_by(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
360
405
|
"""
|
|
361
406
|
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
362
407
|
"""
|
|
363
408
|
return pulumi.get(self, "slide_by")
|
|
364
409
|
|
|
365
410
|
@slide_by.setter
|
|
366
|
-
def slide_by(self, value: Optional[pulumi.Input[int]]):
|
|
411
|
+
def slide_by(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
367
412
|
pulumi.set(self, "slide_by", value)
|
|
368
413
|
|
|
369
|
-
@property
|
|
414
|
+
@_builtins.property
|
|
415
|
+
@pulumi.getter(name="targetEntity")
|
|
416
|
+
def target_entity(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
417
|
+
"""
|
|
418
|
+
BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
419
|
+
"""
|
|
420
|
+
return pulumi.get(self, "target_entity")
|
|
421
|
+
|
|
422
|
+
@target_entity.setter
|
|
423
|
+
def target_entity(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
424
|
+
pulumi.set(self, "target_entity", value)
|
|
425
|
+
|
|
426
|
+
@_builtins.property
|
|
370
427
|
@pulumi.getter
|
|
428
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
|
371
429
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
|
|
372
430
|
"""
|
|
373
431
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
374
432
|
"""
|
|
375
|
-
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
|
376
|
-
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
|
377
|
-
|
|
378
433
|
return pulumi.get(self, "terms")
|
|
379
434
|
|
|
380
435
|
@terms.setter
|
|
381
436
|
def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
|
|
382
437
|
pulumi.set(self, "terms", value)
|
|
383
438
|
|
|
384
|
-
@property
|
|
439
|
+
@_builtins.property
|
|
440
|
+
@pulumi.getter(name="titleTemplate")
|
|
441
|
+
def title_template(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
442
|
+
"""
|
|
443
|
+
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
444
|
+
"""
|
|
445
|
+
return pulumi.get(self, "title_template")
|
|
446
|
+
|
|
447
|
+
@title_template.setter
|
|
448
|
+
def title_template(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
449
|
+
pulumi.set(self, "title_template", value)
|
|
450
|
+
|
|
451
|
+
@_builtins.property
|
|
385
452
|
@pulumi.getter
|
|
386
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
453
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
387
454
|
"""
|
|
388
455
|
The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
389
456
|
"""
|
|
390
457
|
return pulumi.get(self, "type")
|
|
391
458
|
|
|
392
459
|
@type.setter
|
|
393
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
460
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
394
461
|
pulumi.set(self, "type", value)
|
|
395
462
|
|
|
396
|
-
@property
|
|
463
|
+
@_builtins.property
|
|
397
464
|
@pulumi.getter(name="violationTimeLimit")
|
|
398
|
-
|
|
465
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
|
466
|
+
def violation_time_limit(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
399
467
|
"""
|
|
400
468
|
**DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
401
469
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
402
470
|
"""
|
|
403
|
-
warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
|
|
404
|
-
pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
|
|
405
|
-
|
|
406
471
|
return pulumi.get(self, "violation_time_limit")
|
|
407
472
|
|
|
408
473
|
@violation_time_limit.setter
|
|
409
|
-
def violation_time_limit(self, value: Optional[pulumi.Input[str]]):
|
|
474
|
+
def violation_time_limit(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
410
475
|
pulumi.set(self, "violation_time_limit", value)
|
|
411
476
|
|
|
412
|
-
@property
|
|
477
|
+
@_builtins.property
|
|
413
478
|
@pulumi.getter(name="violationTimeLimitSeconds")
|
|
414
|
-
def violation_time_limit_seconds(self) -> Optional[pulumi.Input[int]]:
|
|
479
|
+
def violation_time_limit_seconds(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
415
480
|
"""
|
|
416
481
|
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
417
482
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
@@ -419,10 +484,10 @@ class NrqlAlertConditionArgs:
|
|
|
419
484
|
return pulumi.get(self, "violation_time_limit_seconds")
|
|
420
485
|
|
|
421
486
|
@violation_time_limit_seconds.setter
|
|
422
|
-
def violation_time_limit_seconds(self, value: Optional[pulumi.Input[int]]):
|
|
487
|
+
def violation_time_limit_seconds(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
423
488
|
pulumi.set(self, "violation_time_limit_seconds", value)
|
|
424
489
|
|
|
425
|
-
@property
|
|
490
|
+
@_builtins.property
|
|
426
491
|
@pulumi.getter
|
|
427
492
|
def warning(self) -> Optional[pulumi.Input['NrqlAlertConditionWarningArgs']]:
|
|
428
493
|
"""
|
|
@@ -438,60 +503,68 @@ class NrqlAlertConditionArgs:
|
|
|
438
503
|
@pulumi.input_type
|
|
439
504
|
class _NrqlAlertConditionState:
|
|
440
505
|
def __init__(__self__, *,
|
|
441
|
-
account_id: Optional[pulumi.Input[
|
|
442
|
-
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
|
443
|
-
aggregation_method: Optional[pulumi.Input[str]] = None,
|
|
444
|
-
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
|
445
|
-
aggregation_window: Optional[pulumi.Input[int]] = None,
|
|
446
|
-
baseline_direction: Optional[pulumi.Input[str]] = None,
|
|
447
|
-
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
506
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
507
|
+
aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
|
|
508
|
+
aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
|
|
509
|
+
aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
|
|
510
|
+
aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
|
|
511
|
+
baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
|
|
512
|
+
close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
448
513
|
critical: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']] = None,
|
|
449
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
450
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
451
|
-
entity_guid: Optional[pulumi.Input[str]] = None,
|
|
452
|
-
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
|
453
|
-
expiration_duration: Optional[pulumi.Input[int]] = None,
|
|
454
|
-
fill_option: Optional[pulumi.Input[str]] = None,
|
|
455
|
-
fill_value: Optional[pulumi.Input[float]] = None,
|
|
456
|
-
|
|
514
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
515
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
516
|
+
entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
517
|
+
evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
|
|
518
|
+
expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
|
|
519
|
+
fill_option: Optional[pulumi.Input[_builtins.str]] = None,
|
|
520
|
+
fill_value: Optional[pulumi.Input[_builtins.float]] = None,
|
|
521
|
+
ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
522
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
457
523
|
nrql: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']] = None,
|
|
458
|
-
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
459
|
-
policy_id: Optional[pulumi.Input[
|
|
460
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
461
|
-
|
|
524
|
+
open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
525
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
526
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
527
|
+
signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
|
|
528
|
+
slide_by: Optional[pulumi.Input[_builtins.int]] = None,
|
|
529
|
+
target_entity: Optional[pulumi.Input[_builtins.str]] = None,
|
|
462
530
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
531
|
+
title_template: Optional[pulumi.Input[_builtins.str]] = None,
|
|
532
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
533
|
+
violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
|
|
534
|
+
violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
|
|
466
535
|
warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
|
|
467
536
|
"""
|
|
468
537
|
Input properties used for looking up and filtering NrqlAlertCondition resources.
|
|
469
|
-
:param pulumi.Input[
|
|
470
|
-
:param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
471
|
-
:param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
472
|
-
:param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
473
|
-
:param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
474
|
-
:param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
475
|
-
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
538
|
+
:param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
539
|
+
:param pulumi.Input[_builtins.str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
540
|
+
:param pulumi.Input[_builtins.str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
541
|
+
:param pulumi.Input[_builtins.str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
542
|
+
:param pulumi.Input[_builtins.int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
543
|
+
:param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
544
|
+
:param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
476
545
|
:param pulumi.Input['NrqlAlertConditionCriticalArgs'] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
477
|
-
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
|
478
|
-
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
479
|
-
:param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
|
|
480
|
-
:param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
481
|
-
:param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
482
|
-
:param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
483
|
-
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
|
484
|
-
:param pulumi.Input[
|
|
546
|
+
:param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
|
|
547
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
548
|
+
:param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
|
|
549
|
+
:param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
550
|
+
:param pulumi.Input[_builtins.int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
551
|
+
:param pulumi.Input[_builtins.str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
552
|
+
:param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
|
|
553
|
+
:param pulumi.Input[_builtins.bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
554
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition.
|
|
485
555
|
:param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
|
|
486
|
-
:param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
|
487
|
-
:param pulumi.Input[
|
|
488
|
-
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
|
489
|
-
:param pulumi.Input[
|
|
556
|
+
:param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
|
557
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
558
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
559
|
+
:param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
560
|
+
:param pulumi.Input[_builtins.int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
561
|
+
:param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
490
562
|
:param pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
491
|
-
:param pulumi.Input[str]
|
|
492
|
-
:param pulumi.Input[str]
|
|
563
|
+
:param pulumi.Input[_builtins.str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
564
|
+
:param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
565
|
+
:param pulumi.Input[_builtins.str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
493
566
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
494
|
-
:param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
567
|
+
:param pulumi.Input[_builtins.int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
495
568
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
496
569
|
:param pulumi.Input['NrqlAlertConditionWarningArgs'] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
497
570
|
"""
|
|
@@ -525,6 +598,8 @@ class _NrqlAlertConditionState:
|
|
|
525
598
|
pulumi.set(__self__, "fill_option", fill_option)
|
|
526
599
|
if fill_value is not None:
|
|
527
600
|
pulumi.set(__self__, "fill_value", fill_value)
|
|
601
|
+
if ignore_on_expected_termination is not None:
|
|
602
|
+
pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
|
|
528
603
|
if name is not None:
|
|
529
604
|
pulumi.set(__self__, "name", name)
|
|
530
605
|
if nrql is not None:
|
|
@@ -535,13 +610,19 @@ class _NrqlAlertConditionState:
|
|
|
535
610
|
pulumi.set(__self__, "policy_id", policy_id)
|
|
536
611
|
if runbook_url is not None:
|
|
537
612
|
pulumi.set(__self__, "runbook_url", runbook_url)
|
|
613
|
+
if signal_seasonality is not None:
|
|
614
|
+
pulumi.set(__self__, "signal_seasonality", signal_seasonality)
|
|
538
615
|
if slide_by is not None:
|
|
539
616
|
pulumi.set(__self__, "slide_by", slide_by)
|
|
617
|
+
if target_entity is not None:
|
|
618
|
+
pulumi.set(__self__, "target_entity", target_entity)
|
|
540
619
|
if terms is not None:
|
|
541
620
|
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
|
542
621
|
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
|
543
622
|
if terms is not None:
|
|
544
623
|
pulumi.set(__self__, "terms", terms)
|
|
624
|
+
if title_template is not None:
|
|
625
|
+
pulumi.set(__self__, "title_template", title_template)
|
|
545
626
|
if type is not None:
|
|
546
627
|
pulumi.set(__self__, "type", type)
|
|
547
628
|
if violation_time_limit is not None:
|
|
@@ -554,91 +635,91 @@ class _NrqlAlertConditionState:
|
|
|
554
635
|
if warning is not None:
|
|
555
636
|
pulumi.set(__self__, "warning", warning)
|
|
556
637
|
|
|
557
|
-
@property
|
|
638
|
+
@_builtins.property
|
|
558
639
|
@pulumi.getter(name="accountId")
|
|
559
|
-
def account_id(self) -> Optional[pulumi.Input[
|
|
640
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
560
641
|
"""
|
|
561
642
|
The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
562
643
|
"""
|
|
563
644
|
return pulumi.get(self, "account_id")
|
|
564
645
|
|
|
565
646
|
@account_id.setter
|
|
566
|
-
def account_id(self, value: Optional[pulumi.Input[
|
|
647
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
567
648
|
pulumi.set(self, "account_id", value)
|
|
568
649
|
|
|
569
|
-
@property
|
|
650
|
+
@_builtins.property
|
|
570
651
|
@pulumi.getter(name="aggregationDelay")
|
|
571
|
-
def aggregation_delay(self) -> Optional[pulumi.Input[str]]:
|
|
652
|
+
def aggregation_delay(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
572
653
|
"""
|
|
573
654
|
How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
574
655
|
"""
|
|
575
656
|
return pulumi.get(self, "aggregation_delay")
|
|
576
657
|
|
|
577
658
|
@aggregation_delay.setter
|
|
578
|
-
def aggregation_delay(self, value: Optional[pulumi.Input[str]]):
|
|
659
|
+
def aggregation_delay(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
579
660
|
pulumi.set(self, "aggregation_delay", value)
|
|
580
661
|
|
|
581
|
-
@property
|
|
662
|
+
@_builtins.property
|
|
582
663
|
@pulumi.getter(name="aggregationMethod")
|
|
583
|
-
def aggregation_method(self) -> Optional[pulumi.Input[str]]:
|
|
664
|
+
def aggregation_method(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
584
665
|
"""
|
|
585
666
|
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
586
667
|
"""
|
|
587
668
|
return pulumi.get(self, "aggregation_method")
|
|
588
669
|
|
|
589
670
|
@aggregation_method.setter
|
|
590
|
-
def aggregation_method(self, value: Optional[pulumi.Input[str]]):
|
|
671
|
+
def aggregation_method(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
591
672
|
pulumi.set(self, "aggregation_method", value)
|
|
592
673
|
|
|
593
|
-
@property
|
|
674
|
+
@_builtins.property
|
|
594
675
|
@pulumi.getter(name="aggregationTimer")
|
|
595
|
-
def aggregation_timer(self) -> Optional[pulumi.Input[str]]:
|
|
676
|
+
def aggregation_timer(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
596
677
|
"""
|
|
597
678
|
How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
598
679
|
"""
|
|
599
680
|
return pulumi.get(self, "aggregation_timer")
|
|
600
681
|
|
|
601
682
|
@aggregation_timer.setter
|
|
602
|
-
def aggregation_timer(self, value: Optional[pulumi.Input[str]]):
|
|
683
|
+
def aggregation_timer(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
603
684
|
pulumi.set(self, "aggregation_timer", value)
|
|
604
685
|
|
|
605
|
-
@property
|
|
686
|
+
@_builtins.property
|
|
606
687
|
@pulumi.getter(name="aggregationWindow")
|
|
607
|
-
def aggregation_window(self) -> Optional[pulumi.Input[int]]:
|
|
688
|
+
def aggregation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
608
689
|
"""
|
|
609
|
-
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
690
|
+
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
610
691
|
"""
|
|
611
692
|
return pulumi.get(self, "aggregation_window")
|
|
612
693
|
|
|
613
694
|
@aggregation_window.setter
|
|
614
|
-
def aggregation_window(self, value: Optional[pulumi.Input[int]]):
|
|
695
|
+
def aggregation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
615
696
|
pulumi.set(self, "aggregation_window", value)
|
|
616
697
|
|
|
617
|
-
@property
|
|
698
|
+
@_builtins.property
|
|
618
699
|
@pulumi.getter(name="baselineDirection")
|
|
619
|
-
def baseline_direction(self) -> Optional[pulumi.Input[str]]:
|
|
700
|
+
def baseline_direction(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
620
701
|
"""
|
|
621
702
|
The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
622
703
|
"""
|
|
623
704
|
return pulumi.get(self, "baseline_direction")
|
|
624
705
|
|
|
625
706
|
@baseline_direction.setter
|
|
626
|
-
def baseline_direction(self, value: Optional[pulumi.Input[str]]):
|
|
707
|
+
def baseline_direction(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
627
708
|
pulumi.set(self, "baseline_direction", value)
|
|
628
709
|
|
|
629
|
-
@property
|
|
710
|
+
@_builtins.property
|
|
630
711
|
@pulumi.getter(name="closeViolationsOnExpiration")
|
|
631
|
-
def close_violations_on_expiration(self) -> Optional[pulumi.Input[bool]]:
|
|
712
|
+
def close_violations_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
632
713
|
"""
|
|
633
714
|
Whether to close all open incidents when the signal expires.
|
|
634
715
|
"""
|
|
635
716
|
return pulumi.get(self, "close_violations_on_expiration")
|
|
636
717
|
|
|
637
718
|
@close_violations_on_expiration.setter
|
|
638
|
-
def close_violations_on_expiration(self, value: Optional[pulumi.Input[bool]]):
|
|
719
|
+
def close_violations_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
639
720
|
pulumi.set(self, "close_violations_on_expiration", value)
|
|
640
721
|
|
|
641
|
-
@property
|
|
722
|
+
@_builtins.property
|
|
642
723
|
@pulumi.getter
|
|
643
724
|
def critical(self) -> Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]:
|
|
644
725
|
"""
|
|
@@ -650,103 +731,115 @@ class _NrqlAlertConditionState:
|
|
|
650
731
|
def critical(self, value: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]):
|
|
651
732
|
pulumi.set(self, "critical", value)
|
|
652
733
|
|
|
653
|
-
@property
|
|
734
|
+
@_builtins.property
|
|
654
735
|
@pulumi.getter
|
|
655
|
-
def description(self) -> Optional[pulumi.Input[str]]:
|
|
736
|
+
def description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
656
737
|
"""
|
|
657
738
|
The description of the NRQL alert condition.
|
|
658
739
|
"""
|
|
659
740
|
return pulumi.get(self, "description")
|
|
660
741
|
|
|
661
742
|
@description.setter
|
|
662
|
-
def description(self, value: Optional[pulumi.Input[str]]):
|
|
743
|
+
def description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
663
744
|
pulumi.set(self, "description", value)
|
|
664
745
|
|
|
665
|
-
@property
|
|
746
|
+
@_builtins.property
|
|
666
747
|
@pulumi.getter
|
|
667
|
-
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
748
|
+
def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
668
749
|
"""
|
|
669
750
|
Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
670
751
|
"""
|
|
671
752
|
return pulumi.get(self, "enabled")
|
|
672
753
|
|
|
673
754
|
@enabled.setter
|
|
674
|
-
def enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
755
|
+
def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
675
756
|
pulumi.set(self, "enabled", value)
|
|
676
757
|
|
|
677
|
-
@property
|
|
758
|
+
@_builtins.property
|
|
678
759
|
@pulumi.getter(name="entityGuid")
|
|
679
|
-
def entity_guid(self) -> Optional[pulumi.Input[str]]:
|
|
760
|
+
def entity_guid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
680
761
|
"""
|
|
681
762
|
The unique entity identifier of the NRQL Condition in New Relic.
|
|
682
763
|
"""
|
|
683
764
|
return pulumi.get(self, "entity_guid")
|
|
684
765
|
|
|
685
766
|
@entity_guid.setter
|
|
686
|
-
def entity_guid(self, value: Optional[pulumi.Input[str]]):
|
|
767
|
+
def entity_guid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
687
768
|
pulumi.set(self, "entity_guid", value)
|
|
688
769
|
|
|
689
|
-
@property
|
|
770
|
+
@_builtins.property
|
|
690
771
|
@pulumi.getter(name="evaluationDelay")
|
|
691
|
-
def evaluation_delay(self) -> Optional[pulumi.Input[int]]:
|
|
772
|
+
def evaluation_delay(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
692
773
|
"""
|
|
693
774
|
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
694
775
|
"""
|
|
695
776
|
return pulumi.get(self, "evaluation_delay")
|
|
696
777
|
|
|
697
778
|
@evaluation_delay.setter
|
|
698
|
-
def evaluation_delay(self, value: Optional[pulumi.Input[int]]):
|
|
779
|
+
def evaluation_delay(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
699
780
|
pulumi.set(self, "evaluation_delay", value)
|
|
700
781
|
|
|
701
|
-
@property
|
|
782
|
+
@_builtins.property
|
|
702
783
|
@pulumi.getter(name="expirationDuration")
|
|
703
|
-
def expiration_duration(self) -> Optional[pulumi.Input[int]]:
|
|
784
|
+
def expiration_duration(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
704
785
|
"""
|
|
705
786
|
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
706
787
|
"""
|
|
707
788
|
return pulumi.get(self, "expiration_duration")
|
|
708
789
|
|
|
709
790
|
@expiration_duration.setter
|
|
710
|
-
def expiration_duration(self, value: Optional[pulumi.Input[int]]):
|
|
791
|
+
def expiration_duration(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
711
792
|
pulumi.set(self, "expiration_duration", value)
|
|
712
793
|
|
|
713
|
-
@property
|
|
794
|
+
@_builtins.property
|
|
714
795
|
@pulumi.getter(name="fillOption")
|
|
715
|
-
def fill_option(self) -> Optional[pulumi.Input[str]]:
|
|
796
|
+
def fill_option(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
716
797
|
"""
|
|
717
798
|
Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
718
799
|
"""
|
|
719
800
|
return pulumi.get(self, "fill_option")
|
|
720
801
|
|
|
721
802
|
@fill_option.setter
|
|
722
|
-
def fill_option(self, value: Optional[pulumi.Input[str]]):
|
|
803
|
+
def fill_option(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
723
804
|
pulumi.set(self, "fill_option", value)
|
|
724
805
|
|
|
725
|
-
@property
|
|
806
|
+
@_builtins.property
|
|
726
807
|
@pulumi.getter(name="fillValue")
|
|
727
|
-
def fill_value(self) -> Optional[pulumi.Input[float]]:
|
|
808
|
+
def fill_value(self) -> Optional[pulumi.Input[_builtins.float]]:
|
|
728
809
|
"""
|
|
729
810
|
This value will be used for filling gaps in the signal.
|
|
730
811
|
"""
|
|
731
812
|
return pulumi.get(self, "fill_value")
|
|
732
813
|
|
|
733
814
|
@fill_value.setter
|
|
734
|
-
def fill_value(self, value: Optional[pulumi.Input[float]]):
|
|
815
|
+
def fill_value(self, value: Optional[pulumi.Input[_builtins.float]]):
|
|
735
816
|
pulumi.set(self, "fill_value", value)
|
|
736
817
|
|
|
737
|
-
@property
|
|
818
|
+
@_builtins.property
|
|
819
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
|
820
|
+
def ignore_on_expected_termination(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
821
|
+
"""
|
|
822
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
823
|
+
"""
|
|
824
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
|
825
|
+
|
|
826
|
+
@ignore_on_expected_termination.setter
|
|
827
|
+
def ignore_on_expected_termination(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
828
|
+
pulumi.set(self, "ignore_on_expected_termination", value)
|
|
829
|
+
|
|
830
|
+
@_builtins.property
|
|
738
831
|
@pulumi.getter
|
|
739
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
832
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
740
833
|
"""
|
|
741
834
|
The title of the condition.
|
|
742
835
|
"""
|
|
743
836
|
return pulumi.get(self, "name")
|
|
744
837
|
|
|
745
838
|
@name.setter
|
|
746
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
839
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
747
840
|
pulumi.set(self, "name", value)
|
|
748
841
|
|
|
749
|
-
@property
|
|
842
|
+
@_builtins.property
|
|
750
843
|
@pulumi.getter
|
|
751
844
|
def nrql(self) -> Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']]:
|
|
752
845
|
"""
|
|
@@ -758,100 +851,132 @@ class _NrqlAlertConditionState:
|
|
|
758
851
|
def nrql(self, value: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']]):
|
|
759
852
|
pulumi.set(self, "nrql", value)
|
|
760
853
|
|
|
761
|
-
@property
|
|
854
|
+
@_builtins.property
|
|
762
855
|
@pulumi.getter(name="openViolationOnExpiration")
|
|
763
|
-
def open_violation_on_expiration(self) -> Optional[pulumi.Input[bool]]:
|
|
856
|
+
def open_violation_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
764
857
|
"""
|
|
765
858
|
Whether to create a new incident to capture that the signal expired.
|
|
766
859
|
"""
|
|
767
860
|
return pulumi.get(self, "open_violation_on_expiration")
|
|
768
861
|
|
|
769
862
|
@open_violation_on_expiration.setter
|
|
770
|
-
def open_violation_on_expiration(self, value: Optional[pulumi.Input[bool]]):
|
|
863
|
+
def open_violation_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
771
864
|
pulumi.set(self, "open_violation_on_expiration", value)
|
|
772
865
|
|
|
773
|
-
@property
|
|
866
|
+
@_builtins.property
|
|
774
867
|
@pulumi.getter(name="policyId")
|
|
775
|
-
def policy_id(self) -> Optional[pulumi.Input[
|
|
868
|
+
def policy_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
776
869
|
"""
|
|
777
870
|
The ID of the policy where this condition should be used.
|
|
778
871
|
"""
|
|
779
872
|
return pulumi.get(self, "policy_id")
|
|
780
873
|
|
|
781
874
|
@policy_id.setter
|
|
782
|
-
def policy_id(self, value: Optional[pulumi.Input[
|
|
875
|
+
def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
783
876
|
pulumi.set(self, "policy_id", value)
|
|
784
877
|
|
|
785
|
-
@property
|
|
878
|
+
@_builtins.property
|
|
786
879
|
@pulumi.getter(name="runbookUrl")
|
|
787
|
-
def runbook_url(self) -> Optional[pulumi.Input[str]]:
|
|
880
|
+
def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
788
881
|
"""
|
|
789
882
|
Runbook URL to display in notifications.
|
|
790
883
|
"""
|
|
791
884
|
return pulumi.get(self, "runbook_url")
|
|
792
885
|
|
|
793
886
|
@runbook_url.setter
|
|
794
|
-
def runbook_url(self, value: Optional[pulumi.Input[str]]):
|
|
887
|
+
def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
795
888
|
pulumi.set(self, "runbook_url", value)
|
|
796
889
|
|
|
797
|
-
@property
|
|
890
|
+
@_builtins.property
|
|
891
|
+
@pulumi.getter(name="signalSeasonality")
|
|
892
|
+
def signal_seasonality(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
893
|
+
"""
|
|
894
|
+
Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
895
|
+
"""
|
|
896
|
+
return pulumi.get(self, "signal_seasonality")
|
|
897
|
+
|
|
898
|
+
@signal_seasonality.setter
|
|
899
|
+
def signal_seasonality(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
900
|
+
pulumi.set(self, "signal_seasonality", value)
|
|
901
|
+
|
|
902
|
+
@_builtins.property
|
|
798
903
|
@pulumi.getter(name="slideBy")
|
|
799
|
-
def slide_by(self) -> Optional[pulumi.Input[int]]:
|
|
904
|
+
def slide_by(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
800
905
|
"""
|
|
801
906
|
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
802
907
|
"""
|
|
803
908
|
return pulumi.get(self, "slide_by")
|
|
804
909
|
|
|
805
910
|
@slide_by.setter
|
|
806
|
-
def slide_by(self, value: Optional[pulumi.Input[int]]):
|
|
911
|
+
def slide_by(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
807
912
|
pulumi.set(self, "slide_by", value)
|
|
808
913
|
|
|
809
|
-
@property
|
|
914
|
+
@_builtins.property
|
|
915
|
+
@pulumi.getter(name="targetEntity")
|
|
916
|
+
def target_entity(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
917
|
+
"""
|
|
918
|
+
BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
919
|
+
"""
|
|
920
|
+
return pulumi.get(self, "target_entity")
|
|
921
|
+
|
|
922
|
+
@target_entity.setter
|
|
923
|
+
def target_entity(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
924
|
+
pulumi.set(self, "target_entity", value)
|
|
925
|
+
|
|
926
|
+
@_builtins.property
|
|
810
927
|
@pulumi.getter
|
|
928
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
|
811
929
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
|
|
812
930
|
"""
|
|
813
931
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
814
932
|
"""
|
|
815
|
-
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
|
816
|
-
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
|
817
|
-
|
|
818
933
|
return pulumi.get(self, "terms")
|
|
819
934
|
|
|
820
935
|
@terms.setter
|
|
821
936
|
def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
|
|
822
937
|
pulumi.set(self, "terms", value)
|
|
823
938
|
|
|
824
|
-
@property
|
|
939
|
+
@_builtins.property
|
|
940
|
+
@pulumi.getter(name="titleTemplate")
|
|
941
|
+
def title_template(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
942
|
+
"""
|
|
943
|
+
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
944
|
+
"""
|
|
945
|
+
return pulumi.get(self, "title_template")
|
|
946
|
+
|
|
947
|
+
@title_template.setter
|
|
948
|
+
def title_template(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
949
|
+
pulumi.set(self, "title_template", value)
|
|
950
|
+
|
|
951
|
+
@_builtins.property
|
|
825
952
|
@pulumi.getter
|
|
826
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
953
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
827
954
|
"""
|
|
828
955
|
The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
829
956
|
"""
|
|
830
957
|
return pulumi.get(self, "type")
|
|
831
958
|
|
|
832
959
|
@type.setter
|
|
833
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
960
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
834
961
|
pulumi.set(self, "type", value)
|
|
835
962
|
|
|
836
|
-
@property
|
|
963
|
+
@_builtins.property
|
|
837
964
|
@pulumi.getter(name="violationTimeLimit")
|
|
838
|
-
|
|
965
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
|
966
|
+
def violation_time_limit(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
839
967
|
"""
|
|
840
968
|
**DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
841
969
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
842
970
|
"""
|
|
843
|
-
warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
|
|
844
|
-
pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
|
|
845
|
-
|
|
846
971
|
return pulumi.get(self, "violation_time_limit")
|
|
847
972
|
|
|
848
973
|
@violation_time_limit.setter
|
|
849
|
-
def violation_time_limit(self, value: Optional[pulumi.Input[str]]):
|
|
974
|
+
def violation_time_limit(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
850
975
|
pulumi.set(self, "violation_time_limit", value)
|
|
851
976
|
|
|
852
|
-
@property
|
|
977
|
+
@_builtins.property
|
|
853
978
|
@pulumi.getter(name="violationTimeLimitSeconds")
|
|
854
|
-
def violation_time_limit_seconds(self) -> Optional[pulumi.Input[int]]:
|
|
979
|
+
def violation_time_limit_seconds(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
855
980
|
"""
|
|
856
981
|
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
857
982
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
@@ -859,10 +984,10 @@ class _NrqlAlertConditionState:
|
|
|
859
984
|
return pulumi.get(self, "violation_time_limit_seconds")
|
|
860
985
|
|
|
861
986
|
@violation_time_limit_seconds.setter
|
|
862
|
-
def violation_time_limit_seconds(self, value: Optional[pulumi.Input[int]]):
|
|
987
|
+
def violation_time_limit_seconds(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
863
988
|
pulumi.set(self, "violation_time_limit_seconds", value)
|
|
864
989
|
|
|
865
|
-
@property
|
|
990
|
+
@_builtins.property
|
|
866
991
|
@pulumi.getter
|
|
867
992
|
def warning(self) -> Optional[pulumi.Input['NrqlAlertConditionWarningArgs']]:
|
|
868
993
|
"""
|
|
@@ -875,46 +1000,98 @@ class _NrqlAlertConditionState:
|
|
|
875
1000
|
pulumi.set(self, "warning", value)
|
|
876
1001
|
|
|
877
1002
|
|
|
1003
|
+
@pulumi.type_token("newrelic:index/nrqlAlertCondition:NrqlAlertCondition")
|
|
878
1004
|
class NrqlAlertCondition(pulumi.CustomResource):
|
|
879
1005
|
@overload
|
|
880
1006
|
def __init__(__self__,
|
|
881
1007
|
resource_name: str,
|
|
882
1008
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
883
|
-
account_id: Optional[pulumi.Input[
|
|
884
|
-
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
|
885
|
-
aggregation_method: Optional[pulumi.Input[str]] = None,
|
|
886
|
-
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
|
887
|
-
aggregation_window: Optional[pulumi.Input[int]] = None,
|
|
888
|
-
baseline_direction: Optional[pulumi.Input[str]] = None,
|
|
889
|
-
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
890
|
-
critical: Optional[pulumi.Input[
|
|
891
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
892
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
893
|
-
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
|
894
|
-
expiration_duration: Optional[pulumi.Input[int]] = None,
|
|
895
|
-
fill_option: Optional[pulumi.Input[str]] = None,
|
|
896
|
-
fill_value: Optional[pulumi.Input[float]] = None,
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1009
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1010
|
+
aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1011
|
+
aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1012
|
+
aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1013
|
+
aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1014
|
+
baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1015
|
+
close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1016
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
|
1017
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1018
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1019
|
+
evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1020
|
+
expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1021
|
+
fill_option: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1022
|
+
fill_value: Optional[pulumi.Input[_builtins.float]] = None,
|
|
1023
|
+
ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1024
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1025
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
|
1026
|
+
open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1027
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1028
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1029
|
+
signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1030
|
+
slide_by: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1031
|
+
target_entity: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1032
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
|
1033
|
+
title_template: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1034
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1035
|
+
violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1036
|
+
violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1037
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
|
|
908
1038
|
__props__=None):
|
|
909
1039
|
"""
|
|
910
1040
|
Use this resource to create and manage NRQL alert conditions in New Relic.
|
|
911
1041
|
|
|
912
1042
|
## Example Usage
|
|
1043
|
+
|
|
1044
|
+
### Type: `static` (default)
|
|
1045
|
+
|
|
1046
|
+
```python
|
|
1047
|
+
import pulumi
|
|
1048
|
+
import pulumi_newrelic as newrelic
|
|
1049
|
+
|
|
1050
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1051
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
1052
|
+
account_id="12345678",
|
|
1053
|
+
policy_id=foo.id,
|
|
1054
|
+
type="static",
|
|
1055
|
+
name="foo",
|
|
1056
|
+
description="Alert when transactions are taking too long",
|
|
1057
|
+
title_template="Issue in environment: {{ tags.environment }}",
|
|
1058
|
+
target_entity="MXxBUE18QVBQTElDQVRJT058MQ",
|
|
1059
|
+
runbook_url="https://www.example.com",
|
|
1060
|
+
enabled=True,
|
|
1061
|
+
violation_time_limit_seconds=3600,
|
|
1062
|
+
fill_option="static",
|
|
1063
|
+
fill_value=1,
|
|
1064
|
+
aggregation_window=60,
|
|
1065
|
+
aggregation_method="event_flow",
|
|
1066
|
+
aggregation_delay="120",
|
|
1067
|
+
expiration_duration=120,
|
|
1068
|
+
open_violation_on_expiration=True,
|
|
1069
|
+
close_violations_on_expiration=True,
|
|
1070
|
+
ignore_on_expected_termination=True,
|
|
1071
|
+
slide_by=30,
|
|
1072
|
+
nrql={
|
|
1073
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1074
|
+
},
|
|
1075
|
+
critical={
|
|
1076
|
+
"operator": "above",
|
|
1077
|
+
"threshold": 5.5,
|
|
1078
|
+
"threshold_duration": 300,
|
|
1079
|
+
"threshold_occurrences": "ALL",
|
|
1080
|
+
},
|
|
1081
|
+
warning={
|
|
1082
|
+
"operator": "above",
|
|
1083
|
+
"threshold": 3.5,
|
|
1084
|
+
"threshold_duration": 600,
|
|
1085
|
+
"threshold_occurrences": "ALL",
|
|
1086
|
+
})
|
|
1087
|
+
```
|
|
1088
|
+
|
|
913
1089
|
## NRQL
|
|
914
1090
|
|
|
915
1091
|
The `nrql` block supports the following arguments:
|
|
916
1092
|
|
|
917
1093
|
- `query` - (Required) The NRQL query to execute for the condition.
|
|
1094
|
+
- `data_account_id` - (Optional) The account ID to use for the alert condition's query as specified in the the `query` field. If `data_account_id` is not specified, then the condition's query will be evaluated against the `account_id`. Note that the `account_id` must have read privileges for the `data_account_id` or else the condition will be invalid.
|
|
918
1095
|
- `evaluation_offset` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on their `aggregation_window` size. The start time depends on this value. It's recommended to set this to 3 windows. An offset of less than 3 windows will trigger incidents sooner, but you may see more false positives and negatives due to data latency. With `evaluation_offset` set to 3 windows and an `aggregation_window` of 60 seconds, the NRQL time window applied to your query will be: `SINCE 3 minutes ago UNTIL 2 minutes ago`. `evaluation_offset` cannot be set with `aggregation_method`, `aggregation_delay`, or `aggregation_timer`.<br>
|
|
919
1096
|
- `since_value` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. The value to be used in the `SINCE <X> minutes ago` clause for the NRQL query. Must be between 1-20 (inclusive). <br>
|
|
920
1097
|
|
|
@@ -937,11 +1114,24 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
937
1114
|
- `threshold_occurrences` - (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `at_least_once` (case insensitive).
|
|
938
1115
|
- `duration` - (Optional) **DEPRECATED:** Use `threshold_duration` instead. The duration of time, in _minutes_, that the threshold must violate for in order to create an incident. Must be within 1-120 (inclusive).
|
|
939
1116
|
- `time_function` - (Optional) **DEPRECATED:** Use `threshold_occurrences` instead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `any`.
|
|
1117
|
+
- `prediction` - (Optional) **BETA PREVIEW: the `prediction` field is in limited release and only enabled for preview on a per-account basis.** Use `prediction` to open alerts when your static threshold is predicted to be reached in the future. The `prediction` field is only available for _static_ NRQL alert conditions. See Prediction below for details.
|
|
1118
|
+
- `disable_health_status_reporting` - (Optional) `true` or `false`. Defaults to `false` when field not included in TF config. Violations will not change system health status for this term.
|
|
940
1119
|
|
|
941
1120
|
> **NOTE:** When a `critical` or `warning` block is added to this resource, using either `duration` or `threshold_duration` (one of the two) is mandatory. Both of these should not be specified.
|
|
942
1121
|
|
|
943
1122
|
> **NOTE:** When a `critical` or `warning` block is added to this resource, using either `time_function` or `threshold_occurrences` (one of the two) is mandatory. Both of these should not be specified.
|
|
944
1123
|
|
|
1124
|
+
### Prediction
|
|
1125
|
+
|
|
1126
|
+
> **BETA PREVIEW:** The `prediction` block is in limited release and only enabled for preview on a per-account basis.
|
|
1127
|
+
|
|
1128
|
+
> **NOTE:** The `prediction` block is only available for _static_ NRQL alert conditions.
|
|
1129
|
+
|
|
1130
|
+
The `prediction` block supports the following arguments:
|
|
1131
|
+
|
|
1132
|
+
- `predict_by` - (Optional) The duration, in seconds, that the prediction should look into the future. Default is 3600 seconds (1 hour).
|
|
1133
|
+
- `prefer_prediction_violation` - (Optional) If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting `prefer_prediction_violation` to `true` overrides this behavior leaving the prediction incident open and preventing a static incident from opening. Default is false.
|
|
1134
|
+
|
|
945
1135
|
## Additional Examples
|
|
946
1136
|
|
|
947
1137
|
##### Type: `baseline`
|
|
@@ -952,12 +1142,56 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
952
1142
|
import pulumi
|
|
953
1143
|
import pulumi_newrelic as newrelic
|
|
954
1144
|
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
|
|
1145
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1146
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
958
1147
|
account_id="your_account_id",
|
|
959
|
-
policy_id=
|
|
1148
|
+
policy_id=foo.id,
|
|
1149
|
+
type="static",
|
|
1150
|
+
name="foo",
|
|
1151
|
+
description="Alert when transactions are taking too long",
|
|
1152
|
+
runbook_url="https://www.example.com",
|
|
1153
|
+
enabled=True,
|
|
1154
|
+
violation_time_limit_seconds=3600,
|
|
1155
|
+
fill_option="static",
|
|
1156
|
+
fill_value=1,
|
|
1157
|
+
aggregation_window=60,
|
|
1158
|
+
aggregation_method="event_flow",
|
|
1159
|
+
aggregation_delay="120",
|
|
1160
|
+
expiration_duration=120,
|
|
1161
|
+
open_violation_on_expiration=True,
|
|
1162
|
+
close_violations_on_expiration=True,
|
|
1163
|
+
slide_by=30,
|
|
1164
|
+
nrql={
|
|
1165
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1166
|
+
},
|
|
1167
|
+
critical={
|
|
1168
|
+
"operator": "above",
|
|
1169
|
+
"threshold": 5.5,
|
|
1170
|
+
"threshold_duration": 300,
|
|
1171
|
+
"threshold_occurrences": "ALL",
|
|
1172
|
+
},
|
|
1173
|
+
warning={
|
|
1174
|
+
"operator": "above",
|
|
1175
|
+
"threshold": 3.5,
|
|
1176
|
+
"threshold_duration": 600,
|
|
1177
|
+
"threshold_occurrences": "ALL",
|
|
1178
|
+
})
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1181
|
+
## Tags
|
|
1182
|
+
|
|
1183
|
+
Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
|
|
1184
|
+
|
|
1185
|
+
```python
|
|
1186
|
+
import pulumi
|
|
1187
|
+
import pulumi_newrelic as newrelic
|
|
1188
|
+
|
|
1189
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1190
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
1191
|
+
account_id="12345678",
|
|
1192
|
+
policy_id=foo.id,
|
|
960
1193
|
type="static",
|
|
1194
|
+
name="foo",
|
|
961
1195
|
description="Alert when transactions are taking too long",
|
|
962
1196
|
runbook_url="https://www.example.com",
|
|
963
1197
|
enabled=True,
|
|
@@ -971,23 +1205,40 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
971
1205
|
open_violation_on_expiration=True,
|
|
972
1206
|
close_violations_on_expiration=True,
|
|
973
1207
|
slide_by=30,
|
|
974
|
-
nrql=
|
|
975
|
-
query
|
|
976
|
-
|
|
977
|
-
critical=
|
|
978
|
-
operator
|
|
979
|
-
threshold
|
|
980
|
-
threshold_duration
|
|
981
|
-
threshold_occurrences
|
|
982
|
-
|
|
983
|
-
warning=
|
|
984
|
-
operator
|
|
985
|
-
threshold
|
|
986
|
-
threshold_duration
|
|
987
|
-
threshold_occurrences
|
|
988
|
-
)
|
|
1208
|
+
nrql={
|
|
1209
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1210
|
+
},
|
|
1211
|
+
critical={
|
|
1212
|
+
"operator": "above",
|
|
1213
|
+
"threshold": 5.5,
|
|
1214
|
+
"threshold_duration": 300,
|
|
1215
|
+
"threshold_occurrences": "ALL",
|
|
1216
|
+
},
|
|
1217
|
+
warning={
|
|
1218
|
+
"operator": "above",
|
|
1219
|
+
"threshold": 3.5,
|
|
1220
|
+
"threshold_duration": 600,
|
|
1221
|
+
"threshold_occurrences": "ALL",
|
|
1222
|
+
})
|
|
1223
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
|
1224
|
+
guid=foo_nrql_alert_condition.entity_guid,
|
|
1225
|
+
tags=[
|
|
1226
|
+
{
|
|
1227
|
+
"key": "my-key",
|
|
1228
|
+
"values": [
|
|
1229
|
+
"my-value",
|
|
1230
|
+
"my-other-value",
|
|
1231
|
+
],
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"key": "my-key-2",
|
|
1235
|
+
"values": ["my-value-2"],
|
|
1236
|
+
},
|
|
1237
|
+
])
|
|
989
1238
|
```
|
|
990
1239
|
|
|
1240
|
+
<small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
|
|
1241
|
+
|
|
991
1242
|
## Upgrade from 1.x to 2.x
|
|
992
1243
|
|
|
993
1244
|
There have been several deprecations in the `NrqlAlertCondition`
|
|
@@ -1000,21 +1251,22 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1000
1251
|
import pulumi
|
|
1001
1252
|
import pulumi_newrelic as newrelic
|
|
1002
1253
|
|
|
1003
|
-
|
|
1004
|
-
policy_id=
|
|
1254
|
+
z = newrelic.NrqlAlertCondition("z",
|
|
1255
|
+
policy_id=z_newrelic_alert_policy["id"],
|
|
1256
|
+
name="zleslie-test",
|
|
1005
1257
|
type="static",
|
|
1006
1258
|
runbook_url="https://localhost",
|
|
1007
1259
|
enabled=True,
|
|
1008
1260
|
violation_time_limit="TWENTY_FOUR_HOURS",
|
|
1009
|
-
critical=
|
|
1010
|
-
operator
|
|
1011
|
-
threshold_duration
|
|
1012
|
-
threshold
|
|
1013
|
-
threshold_occurrences
|
|
1014
|
-
|
|
1015
|
-
nrql=
|
|
1016
|
-
query
|
|
1017
|
-
)
|
|
1261
|
+
critical={
|
|
1262
|
+
"operator": "above",
|
|
1263
|
+
"threshold_duration": 120,
|
|
1264
|
+
"threshold": 3,
|
|
1265
|
+
"threshold_occurrences": "AT_LEAST_ONCE",
|
|
1266
|
+
},
|
|
1267
|
+
nrql={
|
|
1268
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
|
1269
|
+
})
|
|
1018
1270
|
```
|
|
1019
1271
|
|
|
1020
1272
|
After making the appropriate adjustments mentioned in the deprecation warnings,
|
|
@@ -1024,67 +1276,74 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1024
1276
|
import pulumi
|
|
1025
1277
|
import pulumi_newrelic as newrelic
|
|
1026
1278
|
|
|
1027
|
-
|
|
1028
|
-
policy_id=
|
|
1279
|
+
z = newrelic.NrqlAlertCondition("z",
|
|
1280
|
+
policy_id=z_newrelic_alert_policy["id"],
|
|
1281
|
+
name="zleslie-test",
|
|
1029
1282
|
type="static",
|
|
1030
1283
|
runbook_url="https://localhost",
|
|
1031
1284
|
enabled=True,
|
|
1032
1285
|
violation_time_limit_seconds=86400,
|
|
1033
|
-
terms=[
|
|
1034
|
-
priority
|
|
1035
|
-
operator
|
|
1036
|
-
threshold
|
|
1037
|
-
duration
|
|
1038
|
-
time_function
|
|
1039
|
-
|
|
1040
|
-
nrql=
|
|
1041
|
-
query
|
|
1042
|
-
)
|
|
1286
|
+
terms=[{
|
|
1287
|
+
"priority": "critical",
|
|
1288
|
+
"operator": "above",
|
|
1289
|
+
"threshold": 3,
|
|
1290
|
+
"duration": 5,
|
|
1291
|
+
"time_function": "any",
|
|
1292
|
+
}],
|
|
1293
|
+
nrql={
|
|
1294
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
|
1295
|
+
})
|
|
1043
1296
|
```
|
|
1044
1297
|
|
|
1045
1298
|
## Import
|
|
1046
1299
|
|
|
1047
|
-
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
|
1300
|
+
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
|
1301
|
+
|
|
1302
|
+
// For `baseline` conditions
|
|
1048
1303
|
|
|
1049
1304
|
```sh
|
|
1050
|
-
|
|
1305
|
+
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:baseline
|
|
1051
1306
|
```
|
|
1052
1307
|
|
|
1053
|
-
|
|
1308
|
+
// For `static` conditions
|
|
1054
1309
|
|
|
1055
1310
|
```sh
|
|
1056
|
-
|
|
1311
|
+
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
|
|
1057
1312
|
```
|
|
1058
1313
|
|
|
1059
1314
|
:param str resource_name: The name of the resource.
|
|
1060
1315
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
1061
|
-
:param pulumi.Input[
|
|
1062
|
-
:param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
1063
|
-
:param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
1064
|
-
:param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
1065
|
-
:param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
1066
|
-
:param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
1067
|
-
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
1068
|
-
:param pulumi.Input[
|
|
1069
|
-
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
|
1070
|
-
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
1071
|
-
:param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
1072
|
-
:param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
1073
|
-
:param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
1074
|
-
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
|
1075
|
-
:param pulumi.Input[
|
|
1076
|
-
:param pulumi.Input[
|
|
1077
|
-
:param pulumi.Input[
|
|
1078
|
-
:param pulumi.Input[
|
|
1079
|
-
:param pulumi.Input[str]
|
|
1080
|
-
:param pulumi.Input[
|
|
1081
|
-
:param pulumi.Input[
|
|
1082
|
-
:param pulumi.Input[
|
|
1083
|
-
:param pulumi.Input[str]
|
|
1316
|
+
:param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
1317
|
+
:param pulumi.Input[_builtins.str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
1318
|
+
:param pulumi.Input[_builtins.str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
1319
|
+
:param pulumi.Input[_builtins.str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
1320
|
+
:param pulumi.Input[_builtins.int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
1321
|
+
:param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
1322
|
+
:param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
1323
|
+
:param pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
1324
|
+
:param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
|
|
1325
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
1326
|
+
:param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
1327
|
+
:param pulumi.Input[_builtins.int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
1328
|
+
:param pulumi.Input[_builtins.str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
1329
|
+
:param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
|
|
1330
|
+
:param pulumi.Input[_builtins.bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
1331
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition.
|
|
1332
|
+
:param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
|
|
1333
|
+
:param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
|
1334
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
1335
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
1336
|
+
:param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
1337
|
+
:param pulumi.Input[_builtins.int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
1338
|
+
:param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
1339
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
1340
|
+
:param pulumi.Input[_builtins.str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
1341
|
+
:param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
1342
|
+
:param pulumi.Input[_builtins.str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
1084
1343
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1085
|
-
:param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
1344
|
+
:param pulumi.Input[_builtins.int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
1086
1345
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1087
|
-
:param pulumi.Input[
|
|
1346
|
+
:param pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
1088
1347
|
"""
|
|
1089
1348
|
...
|
|
1090
1349
|
@overload
|
|
@@ -1096,11 +1355,58 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1096
1355
|
Use this resource to create and manage NRQL alert conditions in New Relic.
|
|
1097
1356
|
|
|
1098
1357
|
## Example Usage
|
|
1358
|
+
|
|
1359
|
+
### Type: `static` (default)
|
|
1360
|
+
|
|
1361
|
+
```python
|
|
1362
|
+
import pulumi
|
|
1363
|
+
import pulumi_newrelic as newrelic
|
|
1364
|
+
|
|
1365
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1366
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
1367
|
+
account_id="12345678",
|
|
1368
|
+
policy_id=foo.id,
|
|
1369
|
+
type="static",
|
|
1370
|
+
name="foo",
|
|
1371
|
+
description="Alert when transactions are taking too long",
|
|
1372
|
+
title_template="Issue in environment: {{ tags.environment }}",
|
|
1373
|
+
target_entity="MXxBUE18QVBQTElDQVRJT058MQ",
|
|
1374
|
+
runbook_url="https://www.example.com",
|
|
1375
|
+
enabled=True,
|
|
1376
|
+
violation_time_limit_seconds=3600,
|
|
1377
|
+
fill_option="static",
|
|
1378
|
+
fill_value=1,
|
|
1379
|
+
aggregation_window=60,
|
|
1380
|
+
aggregation_method="event_flow",
|
|
1381
|
+
aggregation_delay="120",
|
|
1382
|
+
expiration_duration=120,
|
|
1383
|
+
open_violation_on_expiration=True,
|
|
1384
|
+
close_violations_on_expiration=True,
|
|
1385
|
+
ignore_on_expected_termination=True,
|
|
1386
|
+
slide_by=30,
|
|
1387
|
+
nrql={
|
|
1388
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1389
|
+
},
|
|
1390
|
+
critical={
|
|
1391
|
+
"operator": "above",
|
|
1392
|
+
"threshold": 5.5,
|
|
1393
|
+
"threshold_duration": 300,
|
|
1394
|
+
"threshold_occurrences": "ALL",
|
|
1395
|
+
},
|
|
1396
|
+
warning={
|
|
1397
|
+
"operator": "above",
|
|
1398
|
+
"threshold": 3.5,
|
|
1399
|
+
"threshold_duration": 600,
|
|
1400
|
+
"threshold_occurrences": "ALL",
|
|
1401
|
+
})
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1099
1404
|
## NRQL
|
|
1100
1405
|
|
|
1101
1406
|
The `nrql` block supports the following arguments:
|
|
1102
1407
|
|
|
1103
1408
|
- `query` - (Required) The NRQL query to execute for the condition.
|
|
1409
|
+
- `data_account_id` - (Optional) The account ID to use for the alert condition's query as specified in the the `query` field. If `data_account_id` is not specified, then the condition's query will be evaluated against the `account_id`. Note that the `account_id` must have read privileges for the `data_account_id` or else the condition will be invalid.
|
|
1104
1410
|
- `evaluation_offset` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on their `aggregation_window` size. The start time depends on this value. It's recommended to set this to 3 windows. An offset of less than 3 windows will trigger incidents sooner, but you may see more false positives and negatives due to data latency. With `evaluation_offset` set to 3 windows and an `aggregation_window` of 60 seconds, the NRQL time window applied to your query will be: `SINCE 3 minutes ago UNTIL 2 minutes ago`. `evaluation_offset` cannot be set with `aggregation_method`, `aggregation_delay`, or `aggregation_timer`.<br>
|
|
1105
1411
|
- `since_value` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. The value to be used in the `SINCE <X> minutes ago` clause for the NRQL query. Must be between 1-20 (inclusive). <br>
|
|
1106
1412
|
|
|
@@ -1123,11 +1429,24 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1123
1429
|
- `threshold_occurrences` - (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `at_least_once` (case insensitive).
|
|
1124
1430
|
- `duration` - (Optional) **DEPRECATED:** Use `threshold_duration` instead. The duration of time, in _minutes_, that the threshold must violate for in order to create an incident. Must be within 1-120 (inclusive).
|
|
1125
1431
|
- `time_function` - (Optional) **DEPRECATED:** Use `threshold_occurrences` instead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `any`.
|
|
1432
|
+
- `prediction` - (Optional) **BETA PREVIEW: the `prediction` field is in limited release and only enabled for preview on a per-account basis.** Use `prediction` to open alerts when your static threshold is predicted to be reached in the future. The `prediction` field is only available for _static_ NRQL alert conditions. See Prediction below for details.
|
|
1433
|
+
- `disable_health_status_reporting` - (Optional) `true` or `false`. Defaults to `false` when field not included in TF config. Violations will not change system health status for this term.
|
|
1126
1434
|
|
|
1127
1435
|
> **NOTE:** When a `critical` or `warning` block is added to this resource, using either `duration` or `threshold_duration` (one of the two) is mandatory. Both of these should not be specified.
|
|
1128
1436
|
|
|
1129
1437
|
> **NOTE:** When a `critical` or `warning` block is added to this resource, using either `time_function` or `threshold_occurrences` (one of the two) is mandatory. Both of these should not be specified.
|
|
1130
1438
|
|
|
1439
|
+
### Prediction
|
|
1440
|
+
|
|
1441
|
+
> **BETA PREVIEW:** The `prediction` block is in limited release and only enabled for preview on a per-account basis.
|
|
1442
|
+
|
|
1443
|
+
> **NOTE:** The `prediction` block is only available for _static_ NRQL alert conditions.
|
|
1444
|
+
|
|
1445
|
+
The `prediction` block supports the following arguments:
|
|
1446
|
+
|
|
1447
|
+
- `predict_by` - (Optional) The duration, in seconds, that the prediction should look into the future. Default is 3600 seconds (1 hour).
|
|
1448
|
+
- `prefer_prediction_violation` - (Optional) If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting `prefer_prediction_violation` to `true` overrides this behavior leaving the prediction incident open and preventing a static incident from opening. Default is false.
|
|
1449
|
+
|
|
1131
1450
|
## Additional Examples
|
|
1132
1451
|
|
|
1133
1452
|
##### Type: `baseline`
|
|
@@ -1138,12 +1457,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1138
1457
|
import pulumi
|
|
1139
1458
|
import pulumi_newrelic as newrelic
|
|
1140
1459
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
|
|
1460
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1461
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
1144
1462
|
account_id="your_account_id",
|
|
1145
|
-
policy_id=
|
|
1463
|
+
policy_id=foo.id,
|
|
1146
1464
|
type="static",
|
|
1465
|
+
name="foo",
|
|
1147
1466
|
description="Alert when transactions are taking too long",
|
|
1148
1467
|
runbook_url="https://www.example.com",
|
|
1149
1468
|
enabled=True,
|
|
@@ -1157,23 +1476,84 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1157
1476
|
open_violation_on_expiration=True,
|
|
1158
1477
|
close_violations_on_expiration=True,
|
|
1159
1478
|
slide_by=30,
|
|
1160
|
-
nrql=
|
|
1161
|
-
query
|
|
1162
|
-
|
|
1163
|
-
critical=
|
|
1164
|
-
operator
|
|
1165
|
-
threshold
|
|
1166
|
-
threshold_duration
|
|
1167
|
-
threshold_occurrences
|
|
1168
|
-
|
|
1169
|
-
warning=
|
|
1170
|
-
operator
|
|
1171
|
-
threshold
|
|
1172
|
-
threshold_duration
|
|
1173
|
-
threshold_occurrences
|
|
1174
|
-
)
|
|
1479
|
+
nrql={
|
|
1480
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1481
|
+
},
|
|
1482
|
+
critical={
|
|
1483
|
+
"operator": "above",
|
|
1484
|
+
"threshold": 5.5,
|
|
1485
|
+
"threshold_duration": 300,
|
|
1486
|
+
"threshold_occurrences": "ALL",
|
|
1487
|
+
},
|
|
1488
|
+
warning={
|
|
1489
|
+
"operator": "above",
|
|
1490
|
+
"threshold": 3.5,
|
|
1491
|
+
"threshold_duration": 600,
|
|
1492
|
+
"threshold_occurrences": "ALL",
|
|
1493
|
+
})
|
|
1175
1494
|
```
|
|
1176
1495
|
|
|
1496
|
+
## Tags
|
|
1497
|
+
|
|
1498
|
+
Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
|
|
1499
|
+
|
|
1500
|
+
```python
|
|
1501
|
+
import pulumi
|
|
1502
|
+
import pulumi_newrelic as newrelic
|
|
1503
|
+
|
|
1504
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
1505
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
|
1506
|
+
account_id="12345678",
|
|
1507
|
+
policy_id=foo.id,
|
|
1508
|
+
type="static",
|
|
1509
|
+
name="foo",
|
|
1510
|
+
description="Alert when transactions are taking too long",
|
|
1511
|
+
runbook_url="https://www.example.com",
|
|
1512
|
+
enabled=True,
|
|
1513
|
+
violation_time_limit_seconds=3600,
|
|
1514
|
+
fill_option="static",
|
|
1515
|
+
fill_value=1,
|
|
1516
|
+
aggregation_window=60,
|
|
1517
|
+
aggregation_method="event_flow",
|
|
1518
|
+
aggregation_delay="120",
|
|
1519
|
+
expiration_duration=120,
|
|
1520
|
+
open_violation_on_expiration=True,
|
|
1521
|
+
close_violations_on_expiration=True,
|
|
1522
|
+
slide_by=30,
|
|
1523
|
+
nrql={
|
|
1524
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
|
1525
|
+
},
|
|
1526
|
+
critical={
|
|
1527
|
+
"operator": "above",
|
|
1528
|
+
"threshold": 5.5,
|
|
1529
|
+
"threshold_duration": 300,
|
|
1530
|
+
"threshold_occurrences": "ALL",
|
|
1531
|
+
},
|
|
1532
|
+
warning={
|
|
1533
|
+
"operator": "above",
|
|
1534
|
+
"threshold": 3.5,
|
|
1535
|
+
"threshold_duration": 600,
|
|
1536
|
+
"threshold_occurrences": "ALL",
|
|
1537
|
+
})
|
|
1538
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
|
1539
|
+
guid=foo_nrql_alert_condition.entity_guid,
|
|
1540
|
+
tags=[
|
|
1541
|
+
{
|
|
1542
|
+
"key": "my-key",
|
|
1543
|
+
"values": [
|
|
1544
|
+
"my-value",
|
|
1545
|
+
"my-other-value",
|
|
1546
|
+
],
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"key": "my-key-2",
|
|
1550
|
+
"values": ["my-value-2"],
|
|
1551
|
+
},
|
|
1552
|
+
])
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
<small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
|
|
1556
|
+
|
|
1177
1557
|
## Upgrade from 1.x to 2.x
|
|
1178
1558
|
|
|
1179
1559
|
There have been several deprecations in the `NrqlAlertCondition`
|
|
@@ -1186,21 +1566,22 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1186
1566
|
import pulumi
|
|
1187
1567
|
import pulumi_newrelic as newrelic
|
|
1188
1568
|
|
|
1189
|
-
|
|
1190
|
-
policy_id=
|
|
1569
|
+
z = newrelic.NrqlAlertCondition("z",
|
|
1570
|
+
policy_id=z_newrelic_alert_policy["id"],
|
|
1571
|
+
name="zleslie-test",
|
|
1191
1572
|
type="static",
|
|
1192
1573
|
runbook_url="https://localhost",
|
|
1193
1574
|
enabled=True,
|
|
1194
1575
|
violation_time_limit="TWENTY_FOUR_HOURS",
|
|
1195
|
-
critical=
|
|
1196
|
-
operator
|
|
1197
|
-
threshold_duration
|
|
1198
|
-
threshold
|
|
1199
|
-
threshold_occurrences
|
|
1200
|
-
|
|
1201
|
-
nrql=
|
|
1202
|
-
query
|
|
1203
|
-
)
|
|
1576
|
+
critical={
|
|
1577
|
+
"operator": "above",
|
|
1578
|
+
"threshold_duration": 120,
|
|
1579
|
+
"threshold": 3,
|
|
1580
|
+
"threshold_occurrences": "AT_LEAST_ONCE",
|
|
1581
|
+
},
|
|
1582
|
+
nrql={
|
|
1583
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
|
1584
|
+
})
|
|
1204
1585
|
```
|
|
1205
1586
|
|
|
1206
1587
|
After making the appropriate adjustments mentioned in the deprecation warnings,
|
|
@@ -1210,36 +1591,39 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1210
1591
|
import pulumi
|
|
1211
1592
|
import pulumi_newrelic as newrelic
|
|
1212
1593
|
|
|
1213
|
-
|
|
1214
|
-
policy_id=
|
|
1594
|
+
z = newrelic.NrqlAlertCondition("z",
|
|
1595
|
+
policy_id=z_newrelic_alert_policy["id"],
|
|
1596
|
+
name="zleslie-test",
|
|
1215
1597
|
type="static",
|
|
1216
1598
|
runbook_url="https://localhost",
|
|
1217
1599
|
enabled=True,
|
|
1218
1600
|
violation_time_limit_seconds=86400,
|
|
1219
|
-
terms=[
|
|
1220
|
-
priority
|
|
1221
|
-
operator
|
|
1222
|
-
threshold
|
|
1223
|
-
duration
|
|
1224
|
-
time_function
|
|
1225
|
-
|
|
1226
|
-
nrql=
|
|
1227
|
-
query
|
|
1228
|
-
)
|
|
1601
|
+
terms=[{
|
|
1602
|
+
"priority": "critical",
|
|
1603
|
+
"operator": "above",
|
|
1604
|
+
"threshold": 3,
|
|
1605
|
+
"duration": 5,
|
|
1606
|
+
"time_function": "any",
|
|
1607
|
+
}],
|
|
1608
|
+
nrql={
|
|
1609
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
|
1610
|
+
})
|
|
1229
1611
|
```
|
|
1230
1612
|
|
|
1231
1613
|
## Import
|
|
1232
1614
|
|
|
1233
|
-
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
|
1615
|
+
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
|
1616
|
+
|
|
1617
|
+
// For `baseline` conditions
|
|
1234
1618
|
|
|
1235
1619
|
```sh
|
|
1236
|
-
|
|
1620
|
+
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:baseline
|
|
1237
1621
|
```
|
|
1238
1622
|
|
|
1239
|
-
|
|
1623
|
+
// For `static` conditions
|
|
1240
1624
|
|
|
1241
1625
|
```sh
|
|
1242
|
-
|
|
1626
|
+
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
|
|
1243
1627
|
```
|
|
1244
1628
|
|
|
1245
1629
|
:param str resource_name: The name of the resource.
|
|
@@ -1257,31 +1641,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1257
1641
|
def _internal_init(__self__,
|
|
1258
1642
|
resource_name: str,
|
|
1259
1643
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
1260
|
-
account_id: Optional[pulumi.Input[
|
|
1261
|
-
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
|
1262
|
-
aggregation_method: Optional[pulumi.Input[str]] = None,
|
|
1263
|
-
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
|
1264
|
-
aggregation_window: Optional[pulumi.Input[int]] = None,
|
|
1265
|
-
baseline_direction: Optional[pulumi.Input[str]] = None,
|
|
1266
|
-
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
1267
|
-
critical: Optional[pulumi.Input[
|
|
1268
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
1269
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
1270
|
-
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
|
1271
|
-
expiration_duration: Optional[pulumi.Input[int]] = None,
|
|
1272
|
-
fill_option: Optional[pulumi.Input[str]] = None,
|
|
1273
|
-
fill_value: Optional[pulumi.Input[float]] = None,
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1644
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1645
|
+
aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1646
|
+
aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1647
|
+
aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1648
|
+
aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1649
|
+
baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1650
|
+
close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1651
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
|
1652
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1653
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1654
|
+
evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1655
|
+
expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1656
|
+
fill_option: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1657
|
+
fill_value: Optional[pulumi.Input[_builtins.float]] = None,
|
|
1658
|
+
ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1659
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1660
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
|
1661
|
+
open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1662
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1663
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1664
|
+
signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1665
|
+
slide_by: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1666
|
+
target_entity: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1667
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
|
1668
|
+
title_template: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1669
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1670
|
+
violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1671
|
+
violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1672
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
|
|
1285
1673
|
__props__=None):
|
|
1286
1674
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
1287
1675
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -1305,6 +1693,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1305
1693
|
__props__.__dict__["expiration_duration"] = expiration_duration
|
|
1306
1694
|
__props__.__dict__["fill_option"] = fill_option
|
|
1307
1695
|
__props__.__dict__["fill_value"] = fill_value
|
|
1696
|
+
__props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
|
|
1308
1697
|
__props__.__dict__["name"] = name
|
|
1309
1698
|
if nrql is None and not opts.urn:
|
|
1310
1699
|
raise TypeError("Missing required property 'nrql'")
|
|
@@ -1314,8 +1703,11 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1314
1703
|
raise TypeError("Missing required property 'policy_id'")
|
|
1315
1704
|
__props__.__dict__["policy_id"] = policy_id
|
|
1316
1705
|
__props__.__dict__["runbook_url"] = runbook_url
|
|
1706
|
+
__props__.__dict__["signal_seasonality"] = signal_seasonality
|
|
1317
1707
|
__props__.__dict__["slide_by"] = slide_by
|
|
1708
|
+
__props__.__dict__["target_entity"] = target_entity
|
|
1318
1709
|
__props__.__dict__["terms"] = terms
|
|
1710
|
+
__props__.__dict__["title_template"] = title_template
|
|
1319
1711
|
__props__.__dict__["type"] = type
|
|
1320
1712
|
__props__.__dict__["violation_time_limit"] = violation_time_limit
|
|
1321
1713
|
__props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
|
|
@@ -1331,32 +1723,36 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1331
1723
|
def get(resource_name: str,
|
|
1332
1724
|
id: pulumi.Input[str],
|
|
1333
1725
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
1334
|
-
account_id: Optional[pulumi.Input[
|
|
1335
|
-
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
|
1336
|
-
aggregation_method: Optional[pulumi.Input[str]] = None,
|
|
1337
|
-
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
|
1338
|
-
aggregation_window: Optional[pulumi.Input[int]] = None,
|
|
1339
|
-
baseline_direction: Optional[pulumi.Input[str]] = None,
|
|
1340
|
-
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
|
1341
|
-
critical: Optional[pulumi.Input[
|
|
1342
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
1343
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
1344
|
-
entity_guid: Optional[pulumi.Input[str]] = None,
|
|
1345
|
-
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
|
1346
|
-
expiration_duration: Optional[pulumi.Input[int]] = None,
|
|
1347
|
-
fill_option: Optional[pulumi.Input[str]] = None,
|
|
1348
|
-
fill_value: Optional[pulumi.Input[float]] = None,
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1726
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1727
|
+
aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1728
|
+
aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1729
|
+
aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1730
|
+
aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1731
|
+
baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1732
|
+
close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1733
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
|
1734
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1735
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1736
|
+
entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1737
|
+
evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1738
|
+
expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1739
|
+
fill_option: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1740
|
+
fill_value: Optional[pulumi.Input[_builtins.float]] = None,
|
|
1741
|
+
ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1742
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1743
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
|
1744
|
+
open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1745
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1746
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1747
|
+
signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1748
|
+
slide_by: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1749
|
+
target_entity: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1750
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
|
1751
|
+
title_template: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1752
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1753
|
+
violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1754
|
+
violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
|
|
1755
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None) -> 'NrqlAlertCondition':
|
|
1360
1756
|
"""
|
|
1361
1757
|
Get an existing NrqlAlertCondition resource's state with the given name, id, and optional extra
|
|
1362
1758
|
properties used to qualify the lookup.
|
|
@@ -1364,34 +1760,38 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1364
1760
|
:param str resource_name: The unique name of the resulting resource.
|
|
1365
1761
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
1366
1762
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
1367
|
-
:param pulumi.Input[
|
|
1368
|
-
:param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
1369
|
-
:param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
1370
|
-
:param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
1371
|
-
:param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
1372
|
-
:param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
1373
|
-
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
1374
|
-
:param pulumi.Input[
|
|
1375
|
-
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
|
1376
|
-
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
1377
|
-
:param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
|
|
1378
|
-
:param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
1379
|
-
:param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
1380
|
-
:param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
1381
|
-
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
|
1382
|
-
:param pulumi.Input[
|
|
1383
|
-
:param pulumi.Input[
|
|
1384
|
-
:param pulumi.Input[
|
|
1385
|
-
:param pulumi.Input[
|
|
1386
|
-
:param pulumi.Input[str]
|
|
1387
|
-
:param pulumi.Input[
|
|
1388
|
-
:param pulumi.Input[
|
|
1389
|
-
:param pulumi.Input[
|
|
1390
|
-
:param pulumi.Input[str]
|
|
1763
|
+
:param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
1764
|
+
:param pulumi.Input[_builtins.str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
1765
|
+
:param pulumi.Input[_builtins.str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
1766
|
+
:param pulumi.Input[_builtins.str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
1767
|
+
:param pulumi.Input[_builtins.int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
1768
|
+
:param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
1769
|
+
:param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
|
1770
|
+
:param pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
1771
|
+
:param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
|
|
1772
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
1773
|
+
:param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
|
|
1774
|
+
:param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
1775
|
+
:param pulumi.Input[_builtins.int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
1776
|
+
:param pulumi.Input[_builtins.str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
1777
|
+
:param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
|
|
1778
|
+
:param pulumi.Input[_builtins.bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
1779
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition.
|
|
1780
|
+
:param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
|
|
1781
|
+
:param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
|
1782
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
1783
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
1784
|
+
:param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
1785
|
+
:param pulumi.Input[_builtins.int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
1786
|
+
:param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
1787
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
1788
|
+
:param pulumi.Input[_builtins.str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
1789
|
+
:param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
1790
|
+
:param pulumi.Input[_builtins.str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
1391
1791
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1392
|
-
:param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
1792
|
+
:param pulumi.Input[_builtins.int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
1393
1793
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1394
|
-
:param pulumi.Input[
|
|
1794
|
+
:param pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
|
|
1395
1795
|
"""
|
|
1396
1796
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
1397
1797
|
|
|
@@ -1412,76 +1812,80 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1412
1812
|
__props__.__dict__["expiration_duration"] = expiration_duration
|
|
1413
1813
|
__props__.__dict__["fill_option"] = fill_option
|
|
1414
1814
|
__props__.__dict__["fill_value"] = fill_value
|
|
1815
|
+
__props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
|
|
1415
1816
|
__props__.__dict__["name"] = name
|
|
1416
1817
|
__props__.__dict__["nrql"] = nrql
|
|
1417
1818
|
__props__.__dict__["open_violation_on_expiration"] = open_violation_on_expiration
|
|
1418
1819
|
__props__.__dict__["policy_id"] = policy_id
|
|
1419
1820
|
__props__.__dict__["runbook_url"] = runbook_url
|
|
1821
|
+
__props__.__dict__["signal_seasonality"] = signal_seasonality
|
|
1420
1822
|
__props__.__dict__["slide_by"] = slide_by
|
|
1823
|
+
__props__.__dict__["target_entity"] = target_entity
|
|
1421
1824
|
__props__.__dict__["terms"] = terms
|
|
1825
|
+
__props__.__dict__["title_template"] = title_template
|
|
1422
1826
|
__props__.__dict__["type"] = type
|
|
1423
1827
|
__props__.__dict__["violation_time_limit"] = violation_time_limit
|
|
1424
1828
|
__props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
|
|
1425
1829
|
__props__.__dict__["warning"] = warning
|
|
1426
1830
|
return NrqlAlertCondition(resource_name, opts=opts, __props__=__props__)
|
|
1427
1831
|
|
|
1428
|
-
@property
|
|
1832
|
+
@_builtins.property
|
|
1429
1833
|
@pulumi.getter(name="accountId")
|
|
1430
|
-
def account_id(self) -> pulumi.Output[
|
|
1834
|
+
def account_id(self) -> pulumi.Output[_builtins.str]:
|
|
1431
1835
|
"""
|
|
1432
1836
|
The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
1433
1837
|
"""
|
|
1434
1838
|
return pulumi.get(self, "account_id")
|
|
1435
1839
|
|
|
1436
|
-
@property
|
|
1840
|
+
@_builtins.property
|
|
1437
1841
|
@pulumi.getter(name="aggregationDelay")
|
|
1438
|
-
def aggregation_delay(self) -> pulumi.Output[Optional[str]]:
|
|
1842
|
+
def aggregation_delay(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1439
1843
|
"""
|
|
1440
1844
|
How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
|
|
1441
1845
|
"""
|
|
1442
1846
|
return pulumi.get(self, "aggregation_delay")
|
|
1443
1847
|
|
|
1444
|
-
@property
|
|
1848
|
+
@_builtins.property
|
|
1445
1849
|
@pulumi.getter(name="aggregationMethod")
|
|
1446
|
-
def aggregation_method(self) -> pulumi.Output[Optional[str]]:
|
|
1850
|
+
def aggregation_method(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1447
1851
|
"""
|
|
1448
1852
|
Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
|
|
1449
1853
|
"""
|
|
1450
1854
|
return pulumi.get(self, "aggregation_method")
|
|
1451
1855
|
|
|
1452
|
-
@property
|
|
1856
|
+
@_builtins.property
|
|
1453
1857
|
@pulumi.getter(name="aggregationTimer")
|
|
1454
|
-
def aggregation_timer(self) -> pulumi.Output[Optional[str]]:
|
|
1858
|
+
def aggregation_timer(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1455
1859
|
"""
|
|
1456
1860
|
How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
|
|
1457
1861
|
"""
|
|
1458
1862
|
return pulumi.get(self, "aggregation_timer")
|
|
1459
1863
|
|
|
1460
|
-
@property
|
|
1864
|
+
@_builtins.property
|
|
1461
1865
|
@pulumi.getter(name="aggregationWindow")
|
|
1462
|
-
def aggregation_window(self) -> pulumi.Output[int]:
|
|
1866
|
+
def aggregation_window(self) -> pulumi.Output[_builtins.int]:
|
|
1463
1867
|
"""
|
|
1464
|
-
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than
|
|
1868
|
+
The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
|
|
1465
1869
|
"""
|
|
1466
1870
|
return pulumi.get(self, "aggregation_window")
|
|
1467
1871
|
|
|
1468
|
-
@property
|
|
1872
|
+
@_builtins.property
|
|
1469
1873
|
@pulumi.getter(name="baselineDirection")
|
|
1470
|
-
def baseline_direction(self) -> pulumi.Output[Optional[str]]:
|
|
1874
|
+
def baseline_direction(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1471
1875
|
"""
|
|
1472
1876
|
The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
|
|
1473
1877
|
"""
|
|
1474
1878
|
return pulumi.get(self, "baseline_direction")
|
|
1475
1879
|
|
|
1476
|
-
@property
|
|
1880
|
+
@_builtins.property
|
|
1477
1881
|
@pulumi.getter(name="closeViolationsOnExpiration")
|
|
1478
|
-
def close_violations_on_expiration(self) -> pulumi.Output[Optional[bool]]:
|
|
1882
|
+
def close_violations_on_expiration(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
1479
1883
|
"""
|
|
1480
1884
|
Whether to close all open incidents when the signal expires.
|
|
1481
1885
|
"""
|
|
1482
1886
|
return pulumi.get(self, "close_violations_on_expiration")
|
|
1483
1887
|
|
|
1484
|
-
@property
|
|
1888
|
+
@_builtins.property
|
|
1485
1889
|
@pulumi.getter
|
|
1486
1890
|
def critical(self) -> pulumi.Output[Optional['outputs.NrqlAlertConditionCritical']]:
|
|
1487
1891
|
"""
|
|
@@ -1489,71 +1893,79 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1489
1893
|
"""
|
|
1490
1894
|
return pulumi.get(self, "critical")
|
|
1491
1895
|
|
|
1492
|
-
@property
|
|
1896
|
+
@_builtins.property
|
|
1493
1897
|
@pulumi.getter
|
|
1494
|
-
def description(self) -> pulumi.Output[Optional[str]]:
|
|
1898
|
+
def description(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1495
1899
|
"""
|
|
1496
1900
|
The description of the NRQL alert condition.
|
|
1497
1901
|
"""
|
|
1498
1902
|
return pulumi.get(self, "description")
|
|
1499
1903
|
|
|
1500
|
-
@property
|
|
1904
|
+
@_builtins.property
|
|
1501
1905
|
@pulumi.getter
|
|
1502
|
-
def enabled(self) -> pulumi.Output[Optional[bool]]:
|
|
1906
|
+
def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
1503
1907
|
"""
|
|
1504
1908
|
Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
|
1505
1909
|
"""
|
|
1506
1910
|
return pulumi.get(self, "enabled")
|
|
1507
1911
|
|
|
1508
|
-
@property
|
|
1912
|
+
@_builtins.property
|
|
1509
1913
|
@pulumi.getter(name="entityGuid")
|
|
1510
|
-
def entity_guid(self) -> pulumi.Output[str]:
|
|
1914
|
+
def entity_guid(self) -> pulumi.Output[_builtins.str]:
|
|
1511
1915
|
"""
|
|
1512
1916
|
The unique entity identifier of the NRQL Condition in New Relic.
|
|
1513
1917
|
"""
|
|
1514
1918
|
return pulumi.get(self, "entity_guid")
|
|
1515
1919
|
|
|
1516
|
-
@property
|
|
1920
|
+
@_builtins.property
|
|
1517
1921
|
@pulumi.getter(name="evaluationDelay")
|
|
1518
|
-
def evaluation_delay(self) -> pulumi.Output[Optional[int]]:
|
|
1922
|
+
def evaluation_delay(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
1519
1923
|
"""
|
|
1520
1924
|
How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
|
1521
1925
|
"""
|
|
1522
1926
|
return pulumi.get(self, "evaluation_delay")
|
|
1523
1927
|
|
|
1524
|
-
@property
|
|
1928
|
+
@_builtins.property
|
|
1525
1929
|
@pulumi.getter(name="expirationDuration")
|
|
1526
|
-
def expiration_duration(self) -> pulumi.Output[Optional[int]]:
|
|
1930
|
+
def expiration_duration(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
1527
1931
|
"""
|
|
1528
1932
|
The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
|
|
1529
1933
|
"""
|
|
1530
1934
|
return pulumi.get(self, "expiration_duration")
|
|
1531
1935
|
|
|
1532
|
-
@property
|
|
1936
|
+
@_builtins.property
|
|
1533
1937
|
@pulumi.getter(name="fillOption")
|
|
1534
|
-
def fill_option(self) -> pulumi.Output[Optional[str]]:
|
|
1938
|
+
def fill_option(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1535
1939
|
"""
|
|
1536
1940
|
Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
|
|
1537
1941
|
"""
|
|
1538
1942
|
return pulumi.get(self, "fill_option")
|
|
1539
1943
|
|
|
1540
|
-
@property
|
|
1944
|
+
@_builtins.property
|
|
1541
1945
|
@pulumi.getter(name="fillValue")
|
|
1542
|
-
def fill_value(self) -> pulumi.Output[Optional[float]]:
|
|
1946
|
+
def fill_value(self) -> pulumi.Output[Optional[_builtins.float]]:
|
|
1543
1947
|
"""
|
|
1544
1948
|
This value will be used for filling gaps in the signal.
|
|
1545
1949
|
"""
|
|
1546
1950
|
return pulumi.get(self, "fill_value")
|
|
1547
1951
|
|
|
1548
|
-
@property
|
|
1952
|
+
@_builtins.property
|
|
1953
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
|
1954
|
+
def ignore_on_expected_termination(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
1955
|
+
"""
|
|
1956
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
|
1957
|
+
"""
|
|
1958
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
|
1959
|
+
|
|
1960
|
+
@_builtins.property
|
|
1549
1961
|
@pulumi.getter
|
|
1550
|
-
def name(self) -> pulumi.Output[str]:
|
|
1962
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
1551
1963
|
"""
|
|
1552
1964
|
The title of the condition.
|
|
1553
1965
|
"""
|
|
1554
1966
|
return pulumi.get(self, "name")
|
|
1555
1967
|
|
|
1556
|
-
@property
|
|
1968
|
+
@_builtins.property
|
|
1557
1969
|
@pulumi.getter
|
|
1558
1970
|
def nrql(self) -> pulumi.Output['outputs.NrqlAlertConditionNrql']:
|
|
1559
1971
|
"""
|
|
@@ -1561,79 +1973,99 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
|
1561
1973
|
"""
|
|
1562
1974
|
return pulumi.get(self, "nrql")
|
|
1563
1975
|
|
|
1564
|
-
@property
|
|
1976
|
+
@_builtins.property
|
|
1565
1977
|
@pulumi.getter(name="openViolationOnExpiration")
|
|
1566
|
-
def open_violation_on_expiration(self) -> pulumi.Output[Optional[bool]]:
|
|
1978
|
+
def open_violation_on_expiration(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
1567
1979
|
"""
|
|
1568
1980
|
Whether to create a new incident to capture that the signal expired.
|
|
1569
1981
|
"""
|
|
1570
1982
|
return pulumi.get(self, "open_violation_on_expiration")
|
|
1571
1983
|
|
|
1572
|
-
@property
|
|
1984
|
+
@_builtins.property
|
|
1573
1985
|
@pulumi.getter(name="policyId")
|
|
1574
|
-
def policy_id(self) -> pulumi.Output[
|
|
1986
|
+
def policy_id(self) -> pulumi.Output[_builtins.str]:
|
|
1575
1987
|
"""
|
|
1576
1988
|
The ID of the policy where this condition should be used.
|
|
1577
1989
|
"""
|
|
1578
1990
|
return pulumi.get(self, "policy_id")
|
|
1579
1991
|
|
|
1580
|
-
@property
|
|
1992
|
+
@_builtins.property
|
|
1581
1993
|
@pulumi.getter(name="runbookUrl")
|
|
1582
|
-
def runbook_url(self) -> pulumi.Output[Optional[str]]:
|
|
1994
|
+
def runbook_url(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1583
1995
|
"""
|
|
1584
1996
|
Runbook URL to display in notifications.
|
|
1585
1997
|
"""
|
|
1586
1998
|
return pulumi.get(self, "runbook_url")
|
|
1587
1999
|
|
|
1588
|
-
@property
|
|
2000
|
+
@_builtins.property
|
|
2001
|
+
@pulumi.getter(name="signalSeasonality")
|
|
2002
|
+
def signal_seasonality(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
2003
|
+
"""
|
|
2004
|
+
Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
|
|
2005
|
+
"""
|
|
2006
|
+
return pulumi.get(self, "signal_seasonality")
|
|
2007
|
+
|
|
2008
|
+
@_builtins.property
|
|
1589
2009
|
@pulumi.getter(name="slideBy")
|
|
1590
|
-
def slide_by(self) -> pulumi.Output[Optional[int]]:
|
|
2010
|
+
def slide_by(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
1591
2011
|
"""
|
|
1592
2012
|
Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
|
|
1593
2013
|
"""
|
|
1594
2014
|
return pulumi.get(self, "slide_by")
|
|
1595
2015
|
|
|
1596
|
-
@property
|
|
2016
|
+
@_builtins.property
|
|
2017
|
+
@pulumi.getter(name="targetEntity")
|
|
2018
|
+
def target_entity(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
2019
|
+
"""
|
|
2020
|
+
BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
|
|
2021
|
+
"""
|
|
2022
|
+
return pulumi.get(self, "target_entity")
|
|
2023
|
+
|
|
2024
|
+
@_builtins.property
|
|
1597
2025
|
@pulumi.getter
|
|
2026
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
|
1598
2027
|
def terms(self) -> pulumi.Output[Optional[Sequence['outputs.NrqlAlertConditionTerm']]]:
|
|
1599
2028
|
"""
|
|
1600
2029
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
|
1601
2030
|
"""
|
|
1602
|
-
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
|
1603
|
-
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
|
1604
|
-
|
|
1605
2031
|
return pulumi.get(self, "terms")
|
|
1606
2032
|
|
|
1607
|
-
@property
|
|
2033
|
+
@_builtins.property
|
|
2034
|
+
@pulumi.getter(name="titleTemplate")
|
|
2035
|
+
def title_template(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
2036
|
+
"""
|
|
2037
|
+
The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
|
|
2038
|
+
"""
|
|
2039
|
+
return pulumi.get(self, "title_template")
|
|
2040
|
+
|
|
2041
|
+
@_builtins.property
|
|
1608
2042
|
@pulumi.getter
|
|
1609
|
-
def type(self) -> pulumi.Output[Optional[str]]:
|
|
2043
|
+
def type(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
1610
2044
|
"""
|
|
1611
2045
|
The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
|
1612
2046
|
"""
|
|
1613
2047
|
return pulumi.get(self, "type")
|
|
1614
2048
|
|
|
1615
|
-
@property
|
|
2049
|
+
@_builtins.property
|
|
1616
2050
|
@pulumi.getter(name="violationTimeLimit")
|
|
1617
|
-
|
|
2051
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
|
2052
|
+
def violation_time_limit(self) -> pulumi.Output[_builtins.str]:
|
|
1618
2053
|
"""
|
|
1619
2054
|
**DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
|
|
1620
2055
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1621
2056
|
"""
|
|
1622
|
-
warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
|
|
1623
|
-
pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
|
|
1624
|
-
|
|
1625
2057
|
return pulumi.get(self, "violation_time_limit")
|
|
1626
2058
|
|
|
1627
|
-
@property
|
|
2059
|
+
@_builtins.property
|
|
1628
2060
|
@pulumi.getter(name="violationTimeLimitSeconds")
|
|
1629
|
-
def violation_time_limit_seconds(self) -> pulumi.Output[Optional[int]]:
|
|
2061
|
+
def violation_time_limit_seconds(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
1630
2062
|
"""
|
|
1631
2063
|
Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
|
|
1632
2064
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
|
1633
2065
|
"""
|
|
1634
2066
|
return pulumi.get(self, "violation_time_limit_seconds")
|
|
1635
2067
|
|
|
1636
|
-
@property
|
|
2068
|
+
@_builtins.property
|
|
1637
2069
|
@pulumi.getter
|
|
1638
2070
|
def warning(self) -> pulumi.Output[Optional['outputs.NrqlAlertConditionWarning']]:
|
|
1639
2071
|
"""
|