pulumi-newrelic 5.20.0a1709643785__py3-none-any.whl → 5.39.0a1736834464__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pulumi_newrelic/__init__.py +9 -0
- pulumi_newrelic/_inputs.py +7153 -461
- pulumi_newrelic/_utilities.py +41 -5
- pulumi_newrelic/account_management.py +13 -4
- pulumi_newrelic/alert_channel.py +122 -101
- pulumi_newrelic/alert_condition.py +120 -109
- pulumi_newrelic/alert_muting_rule.py +130 -74
- pulumi_newrelic/alert_policy.py +88 -67
- pulumi_newrelic/alert_policy_channel.py +81 -68
- pulumi_newrelic/api_access_key.py +49 -52
- pulumi_newrelic/browser_application.py +79 -76
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +135 -130
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +25 -18
- pulumi_newrelic/cloud/aws_integrations.py +300 -1324
- pulumi_newrelic/cloud/aws_link_account.py +25 -18
- pulumi_newrelic/cloud/azure_integrations.py +523 -481
- pulumi_newrelic/cloud/azure_link_account.py +36 -29
- pulumi_newrelic/cloud/gcp_integrations.py +343 -320
- pulumi_newrelic/cloud/gcp_link_account.py +25 -18
- pulumi_newrelic/cloud/outputs.py +327 -1072
- pulumi_newrelic/config/__init__.pyi +6 -1
- pulumi_newrelic/config/vars.py +7 -2
- pulumi_newrelic/data_partition_rule.py +23 -16
- pulumi_newrelic/entity_tags.py +36 -31
- pulumi_newrelic/events_to_metrics_rule.py +27 -20
- pulumi_newrelic/get_account.py +24 -12
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -27
- pulumi_newrelic/get_authentication_domain.py +17 -9
- pulumi_newrelic/get_cloud_account.py +26 -14
- pulumi_newrelic/get_entity.py +90 -85
- pulumi_newrelic/get_group.py +58 -9
- pulumi_newrelic/get_key_transaction.py +109 -30
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -24
- pulumi_newrelic/get_service_level_alert_helper.py +135 -105
- pulumi_newrelic/get_test_grok_pattern.py +29 -14
- pulumi_newrelic/get_user.py +17 -5
- pulumi_newrelic/group.py +5 -132
- pulumi_newrelic/infra_alert_condition.py +157 -140
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +50 -43
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +29 -18
- pulumi_newrelic/monitor_downtime.py +215 -203
- pulumi_newrelic/notification_channel.py +387 -326
- pulumi_newrelic/notification_destination.py +248 -118
- pulumi_newrelic/nrql_alert_condition.py +353 -246
- pulumi_newrelic/nrql_drop_rule.py +57 -30
- pulumi_newrelic/obfuscation_expression.py +25 -18
- pulumi_newrelic/obfuscation_rule.py +40 -31
- pulumi_newrelic/one_dashboard.py +31 -26
- pulumi_newrelic/one_dashboard_json.py +21 -16
- pulumi_newrelic/one_dashboard_raw.py +112 -101
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +29 -20
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +285 -54
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +193 -180
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +91 -78
- pulumi_newrelic/synthetics/broken_links_monitor.py +220 -93
- pulumi_newrelic/synthetics/cert_check_monitor.py +223 -94
- pulumi_newrelic/synthetics/get_private_location.py +34 -22
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -12
- pulumi_newrelic/synthetics/monitor.py +352 -179
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +109 -96
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +27 -18
- pulumi_newrelic/synthetics/script_monitor.py +321 -168
- pulumi_newrelic/synthetics/secure_credential.py +25 -20
- pulumi_newrelic/synthetics/step_monitor.py +409 -98
- pulumi_newrelic/user.py +13 -6
- pulumi_newrelic/workflow.py +215 -184
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.20.0a1709643785.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
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,8 +22,8 @@ __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[
|
25
|
+
policy_id: pulumi.Input[str],
|
26
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
22
27
|
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
23
28
|
aggregation_method: Optional[pulumi.Input[str]] = None,
|
24
29
|
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
@@ -32,11 +37,13 @@ class NrqlAlertConditionArgs:
|
|
32
37
|
expiration_duration: Optional[pulumi.Input[int]] = None,
|
33
38
|
fill_option: Optional[pulumi.Input[str]] = None,
|
34
39
|
fill_value: Optional[pulumi.Input[float]] = None,
|
40
|
+
ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
|
35
41
|
name: Optional[pulumi.Input[str]] = None,
|
36
42
|
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
37
43
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
38
44
|
slide_by: Optional[pulumi.Input[int]] = None,
|
39
45
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
|
46
|
+
title_template: Optional[pulumi.Input[str]] = None,
|
40
47
|
type: Optional[pulumi.Input[str]] = None,
|
41
48
|
violation_time_limit: Optional[pulumi.Input[str]] = None,
|
42
49
|
violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
|
@@ -44,8 +51,8 @@ class NrqlAlertConditionArgs:
|
|
44
51
|
"""
|
45
52
|
The set of arguments for constructing a NrqlAlertCondition resource.
|
46
53
|
:param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
|
47
|
-
:param pulumi.Input[
|
48
|
-
:param pulumi.Input[
|
54
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
55
|
+
:param pulumi.Input[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`.
|
49
56
|
: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
57
|
: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
58
|
: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`.
|
@@ -59,11 +66,13 @@ class NrqlAlertConditionArgs:
|
|
59
66
|
: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
67
|
: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
68
|
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
69
|
+
:param pulumi.Input[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.
|
62
70
|
:param pulumi.Input[str] name: The title of the condition.
|
63
71
|
:param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
64
72
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
65
73
|
:param pulumi.Input[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`.
|
66
74
|
: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.
|
75
|
+
:param pulumi.Input[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.
|
67
76
|
:param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
68
77
|
:param pulumi.Input[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
78
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
@@ -101,6 +110,8 @@ class NrqlAlertConditionArgs:
|
|
101
110
|
pulumi.set(__self__, "fill_option", fill_option)
|
102
111
|
if fill_value is not None:
|
103
112
|
pulumi.set(__self__, "fill_value", fill_value)
|
113
|
+
if ignore_on_expected_termination is not None:
|
114
|
+
pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
|
104
115
|
if name is not None:
|
105
116
|
pulumi.set(__self__, "name", name)
|
106
117
|
if open_violation_on_expiration is not None:
|
@@ -114,6 +125,8 @@ class NrqlAlertConditionArgs:
|
|
114
125
|
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
115
126
|
if terms is not None:
|
116
127
|
pulumi.set(__self__, "terms", terms)
|
128
|
+
if title_template is not None:
|
129
|
+
pulumi.set(__self__, "title_template", title_template)
|
117
130
|
if type is not None:
|
118
131
|
pulumi.set(__self__, "type", type)
|
119
132
|
if violation_time_limit is not None:
|
@@ -140,26 +153,26 @@ class NrqlAlertConditionArgs:
|
|
140
153
|
|
141
154
|
@property
|
142
155
|
@pulumi.getter(name="policyId")
|
143
|
-
def policy_id(self) -> pulumi.Input[
|
156
|
+
def policy_id(self) -> pulumi.Input[str]:
|
144
157
|
"""
|
145
158
|
The ID of the policy where this condition should be used.
|
146
159
|
"""
|
147
160
|
return pulumi.get(self, "policy_id")
|
148
161
|
|
149
162
|
@policy_id.setter
|
150
|
-
def policy_id(self, value: pulumi.Input[
|
163
|
+
def policy_id(self, value: pulumi.Input[str]):
|
151
164
|
pulumi.set(self, "policy_id", value)
|
152
165
|
|
153
166
|
@property
|
154
167
|
@pulumi.getter(name="accountId")
|
155
|
-
def account_id(self) -> Optional[pulumi.Input[
|
168
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
156
169
|
"""
|
157
170
|
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
171
|
"""
|
159
172
|
return pulumi.get(self, "account_id")
|
160
173
|
|
161
174
|
@account_id.setter
|
162
|
-
def account_id(self, value: Optional[pulumi.Input[
|
175
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
163
176
|
pulumi.set(self, "account_id", value)
|
164
177
|
|
165
178
|
@property
|
@@ -318,6 +331,18 @@ class NrqlAlertConditionArgs:
|
|
318
331
|
def fill_value(self, value: Optional[pulumi.Input[float]]):
|
319
332
|
pulumi.set(self, "fill_value", value)
|
320
333
|
|
334
|
+
@property
|
335
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
336
|
+
def ignore_on_expected_termination(self) -> Optional[pulumi.Input[bool]]:
|
337
|
+
"""
|
338
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
339
|
+
"""
|
340
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
341
|
+
|
342
|
+
@ignore_on_expected_termination.setter
|
343
|
+
def ignore_on_expected_termination(self, value: Optional[pulumi.Input[bool]]):
|
344
|
+
pulumi.set(self, "ignore_on_expected_termination", value)
|
345
|
+
|
321
346
|
@property
|
322
347
|
@pulumi.getter
|
323
348
|
def name(self) -> Optional[pulumi.Input[str]]:
|
@@ -368,19 +393,29 @@ class NrqlAlertConditionArgs:
|
|
368
393
|
|
369
394
|
@property
|
370
395
|
@pulumi.getter
|
396
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
371
397
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
|
372
398
|
"""
|
373
399
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
374
400
|
"""
|
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
401
|
return pulumi.get(self, "terms")
|
379
402
|
|
380
403
|
@terms.setter
|
381
404
|
def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
|
382
405
|
pulumi.set(self, "terms", value)
|
383
406
|
|
407
|
+
@property
|
408
|
+
@pulumi.getter(name="titleTemplate")
|
409
|
+
def title_template(self) -> Optional[pulumi.Input[str]]:
|
410
|
+
"""
|
411
|
+
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.
|
412
|
+
"""
|
413
|
+
return pulumi.get(self, "title_template")
|
414
|
+
|
415
|
+
@title_template.setter
|
416
|
+
def title_template(self, value: Optional[pulumi.Input[str]]):
|
417
|
+
pulumi.set(self, "title_template", value)
|
418
|
+
|
384
419
|
@property
|
385
420
|
@pulumi.getter
|
386
421
|
def type(self) -> Optional[pulumi.Input[str]]:
|
@@ -395,14 +430,12 @@ class NrqlAlertConditionArgs:
|
|
395
430
|
|
396
431
|
@property
|
397
432
|
@pulumi.getter(name="violationTimeLimit")
|
433
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
398
434
|
def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
|
399
435
|
"""
|
400
436
|
**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
437
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
402
438
|
"""
|
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
439
|
return pulumi.get(self, "violation_time_limit")
|
407
440
|
|
408
441
|
@violation_time_limit.setter
|
@@ -438,7 +471,7 @@ class NrqlAlertConditionArgs:
|
|
438
471
|
@pulumi.input_type
|
439
472
|
class _NrqlAlertConditionState:
|
440
473
|
def __init__(__self__, *,
|
441
|
-
account_id: Optional[pulumi.Input[
|
474
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
442
475
|
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
443
476
|
aggregation_method: Optional[pulumi.Input[str]] = None,
|
444
477
|
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
@@ -453,20 +486,22 @@ class _NrqlAlertConditionState:
|
|
453
486
|
expiration_duration: Optional[pulumi.Input[int]] = None,
|
454
487
|
fill_option: Optional[pulumi.Input[str]] = None,
|
455
488
|
fill_value: Optional[pulumi.Input[float]] = None,
|
489
|
+
ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
|
456
490
|
name: Optional[pulumi.Input[str]] = None,
|
457
491
|
nrql: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']] = None,
|
458
492
|
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
459
|
-
policy_id: Optional[pulumi.Input[
|
493
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
460
494
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
461
495
|
slide_by: Optional[pulumi.Input[int]] = None,
|
462
496
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
|
497
|
+
title_template: Optional[pulumi.Input[str]] = None,
|
463
498
|
type: Optional[pulumi.Input[str]] = None,
|
464
499
|
violation_time_limit: Optional[pulumi.Input[str]] = None,
|
465
500
|
violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
|
466
501
|
warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
|
467
502
|
"""
|
468
503
|
Input properties used for looking up and filtering NrqlAlertCondition resources.
|
469
|
-
:param pulumi.Input[
|
504
|
+
:param pulumi.Input[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`.
|
470
505
|
: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
506
|
: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
507
|
: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`.
|
@@ -481,13 +516,15 @@ class _NrqlAlertConditionState:
|
|
481
516
|
: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
517
|
: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
518
|
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
519
|
+
:param pulumi.Input[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.
|
484
520
|
:param pulumi.Input[str] name: The title of the condition.
|
485
521
|
:param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
|
486
522
|
:param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
487
|
-
:param pulumi.Input[
|
523
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
488
524
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
489
525
|
:param pulumi.Input[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`.
|
490
526
|
: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.
|
527
|
+
:param pulumi.Input[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.
|
491
528
|
:param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
492
529
|
:param pulumi.Input[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
530
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
@@ -525,6 +562,8 @@ class _NrqlAlertConditionState:
|
|
525
562
|
pulumi.set(__self__, "fill_option", fill_option)
|
526
563
|
if fill_value is not None:
|
527
564
|
pulumi.set(__self__, "fill_value", fill_value)
|
565
|
+
if ignore_on_expected_termination is not None:
|
566
|
+
pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
|
528
567
|
if name is not None:
|
529
568
|
pulumi.set(__self__, "name", name)
|
530
569
|
if nrql is not None:
|
@@ -542,6 +581,8 @@ class _NrqlAlertConditionState:
|
|
542
581
|
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
543
582
|
if terms is not None:
|
544
583
|
pulumi.set(__self__, "terms", terms)
|
584
|
+
if title_template is not None:
|
585
|
+
pulumi.set(__self__, "title_template", title_template)
|
545
586
|
if type is not None:
|
546
587
|
pulumi.set(__self__, "type", type)
|
547
588
|
if violation_time_limit is not None:
|
@@ -556,14 +597,14 @@ class _NrqlAlertConditionState:
|
|
556
597
|
|
557
598
|
@property
|
558
599
|
@pulumi.getter(name="accountId")
|
559
|
-
def account_id(self) -> Optional[pulumi.Input[
|
600
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
560
601
|
"""
|
561
602
|
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
603
|
"""
|
563
604
|
return pulumi.get(self, "account_id")
|
564
605
|
|
565
606
|
@account_id.setter
|
566
|
-
def account_id(self, value: Optional[pulumi.Input[
|
607
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
567
608
|
pulumi.set(self, "account_id", value)
|
568
609
|
|
569
610
|
@property
|
@@ -734,6 +775,18 @@ class _NrqlAlertConditionState:
|
|
734
775
|
def fill_value(self, value: Optional[pulumi.Input[float]]):
|
735
776
|
pulumi.set(self, "fill_value", value)
|
736
777
|
|
778
|
+
@property
|
779
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
780
|
+
def ignore_on_expected_termination(self) -> Optional[pulumi.Input[bool]]:
|
781
|
+
"""
|
782
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
783
|
+
"""
|
784
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
785
|
+
|
786
|
+
@ignore_on_expected_termination.setter
|
787
|
+
def ignore_on_expected_termination(self, value: Optional[pulumi.Input[bool]]):
|
788
|
+
pulumi.set(self, "ignore_on_expected_termination", value)
|
789
|
+
|
737
790
|
@property
|
738
791
|
@pulumi.getter
|
739
792
|
def name(self) -> Optional[pulumi.Input[str]]:
|
@@ -772,14 +825,14 @@ class _NrqlAlertConditionState:
|
|
772
825
|
|
773
826
|
@property
|
774
827
|
@pulumi.getter(name="policyId")
|
775
|
-
def policy_id(self) -> Optional[pulumi.Input[
|
828
|
+
def policy_id(self) -> Optional[pulumi.Input[str]]:
|
776
829
|
"""
|
777
830
|
The ID of the policy where this condition should be used.
|
778
831
|
"""
|
779
832
|
return pulumi.get(self, "policy_id")
|
780
833
|
|
781
834
|
@policy_id.setter
|
782
|
-
def policy_id(self, value: Optional[pulumi.Input[
|
835
|
+
def policy_id(self, value: Optional[pulumi.Input[str]]):
|
783
836
|
pulumi.set(self, "policy_id", value)
|
784
837
|
|
785
838
|
@property
|
@@ -808,19 +861,29 @@ class _NrqlAlertConditionState:
|
|
808
861
|
|
809
862
|
@property
|
810
863
|
@pulumi.getter
|
864
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
811
865
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
|
812
866
|
"""
|
813
867
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
814
868
|
"""
|
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
869
|
return pulumi.get(self, "terms")
|
819
870
|
|
820
871
|
@terms.setter
|
821
872
|
def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
|
822
873
|
pulumi.set(self, "terms", value)
|
823
874
|
|
875
|
+
@property
|
876
|
+
@pulumi.getter(name="titleTemplate")
|
877
|
+
def title_template(self) -> Optional[pulumi.Input[str]]:
|
878
|
+
"""
|
879
|
+
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.
|
880
|
+
"""
|
881
|
+
return pulumi.get(self, "title_template")
|
882
|
+
|
883
|
+
@title_template.setter
|
884
|
+
def title_template(self, value: Optional[pulumi.Input[str]]):
|
885
|
+
pulumi.set(self, "title_template", value)
|
886
|
+
|
824
887
|
@property
|
825
888
|
@pulumi.getter
|
826
889
|
def type(self) -> Optional[pulumi.Input[str]]:
|
@@ -835,14 +898,12 @@ class _NrqlAlertConditionState:
|
|
835
898
|
|
836
899
|
@property
|
837
900
|
@pulumi.getter(name="violationTimeLimit")
|
901
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
838
902
|
def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
|
839
903
|
"""
|
840
904
|
**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
905
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
842
906
|
"""
|
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
907
|
return pulumi.get(self, "violation_time_limit")
|
847
908
|
|
848
909
|
@violation_time_limit.setter
|
@@ -880,48 +941,53 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
880
941
|
def __init__(__self__,
|
881
942
|
resource_name: str,
|
882
943
|
opts: Optional[pulumi.ResourceOptions] = None,
|
883
|
-
account_id: Optional[pulumi.Input[
|
944
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
884
945
|
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
885
946
|
aggregation_method: Optional[pulumi.Input[str]] = None,
|
886
947
|
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
887
948
|
aggregation_window: Optional[pulumi.Input[int]] = None,
|
888
949
|
baseline_direction: Optional[pulumi.Input[str]] = None,
|
889
950
|
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
890
|
-
critical: Optional[pulumi.Input[
|
951
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
891
952
|
description: Optional[pulumi.Input[str]] = None,
|
892
953
|
enabled: Optional[pulumi.Input[bool]] = None,
|
893
954
|
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
894
955
|
expiration_duration: Optional[pulumi.Input[int]] = None,
|
895
956
|
fill_option: Optional[pulumi.Input[str]] = None,
|
896
957
|
fill_value: Optional[pulumi.Input[float]] = None,
|
958
|
+
ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
|
897
959
|
name: Optional[pulumi.Input[str]] = None,
|
898
|
-
nrql: Optional[pulumi.Input[
|
960
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
899
961
|
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
900
|
-
policy_id: Optional[pulumi.Input[
|
962
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
901
963
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
902
964
|
slide_by: Optional[pulumi.Input[int]] = None,
|
903
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
965
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
966
|
+
title_template: Optional[pulumi.Input[str]] = None,
|
904
967
|
type: Optional[pulumi.Input[str]] = None,
|
905
968
|
violation_time_limit: Optional[pulumi.Input[str]] = None,
|
906
969
|
violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
|
907
|
-
warning: Optional[pulumi.Input[
|
970
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
|
908
971
|
__props__=None):
|
909
972
|
"""
|
910
973
|
Use this resource to create and manage NRQL alert conditions in New Relic.
|
911
974
|
|
912
975
|
## Example Usage
|
976
|
+
|
913
977
|
### Type: `static` (default)
|
914
978
|
|
915
979
|
```python
|
916
980
|
import pulumi
|
917
981
|
import pulumi_newrelic as newrelic
|
918
982
|
|
919
|
-
|
920
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
921
|
-
account_id=12345678,
|
922
|
-
policy_id=
|
983
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
984
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
985
|
+
account_id="12345678",
|
986
|
+
policy_id=foo.id,
|
923
987
|
type="static",
|
988
|
+
name="foo",
|
924
989
|
description="Alert when transactions are taking too long",
|
990
|
+
title_template="Issue in environment: {{ json accumulations.tag.environment }}",
|
925
991
|
runbook_url="https://www.example.com",
|
926
992
|
enabled=True,
|
927
993
|
violation_time_limit_seconds=3600,
|
@@ -933,28 +999,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
933
999
|
expiration_duration=120,
|
934
1000
|
open_violation_on_expiration=True,
|
935
1001
|
close_violations_on_expiration=True,
|
1002
|
+
ignore_on_expected_termination=True,
|
936
1003
|
slide_by=30,
|
937
|
-
nrql=
|
938
|
-
query
|
939
|
-
|
940
|
-
critical=
|
941
|
-
operator
|
942
|
-
threshold
|
943
|
-
threshold_duration
|
944
|
-
threshold_occurrences
|
945
|
-
|
946
|
-
warning=
|
947
|
-
operator
|
948
|
-
threshold
|
949
|
-
threshold_duration
|
950
|
-
threshold_occurrences
|
951
|
-
)
|
1004
|
+
nrql={
|
1005
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1006
|
+
},
|
1007
|
+
critical={
|
1008
|
+
"operator": "above",
|
1009
|
+
"threshold": 5.5,
|
1010
|
+
"threshold_duration": 300,
|
1011
|
+
"threshold_occurrences": "ALL",
|
1012
|
+
},
|
1013
|
+
warning={
|
1014
|
+
"operator": "above",
|
1015
|
+
"threshold": 3.5,
|
1016
|
+
"threshold_duration": 600,
|
1017
|
+
"threshold_occurrences": "ALL",
|
1018
|
+
})
|
952
1019
|
```
|
1020
|
+
|
953
1021
|
## NRQL
|
954
1022
|
|
955
1023
|
The `nrql` block supports the following arguments:
|
956
1024
|
|
957
1025
|
- `query` - (Required) The NRQL query to execute for the condition.
|
1026
|
+
- `data_account_id` - (Optional) **BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis.** 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.
|
958
1027
|
- `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>
|
959
1028
|
- `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>
|
960
1029
|
|
@@ -992,11 +1061,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
992
1061
|
import pulumi
|
993
1062
|
import pulumi_newrelic as newrelic
|
994
1063
|
|
995
|
-
|
996
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
1064
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
1065
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
997
1066
|
account_id="your_account_id",
|
998
|
-
policy_id=
|
1067
|
+
policy_id=foo.id,
|
999
1068
|
type="static",
|
1069
|
+
name="foo",
|
1000
1070
|
description="Alert when transactions are taking too long",
|
1001
1071
|
runbook_url="https://www.example.com",
|
1002
1072
|
enabled=True,
|
@@ -1010,21 +1080,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1010
1080
|
open_violation_on_expiration=True,
|
1011
1081
|
close_violations_on_expiration=True,
|
1012
1082
|
slide_by=30,
|
1013
|
-
nrql=
|
1014
|
-
query
|
1015
|
-
|
1016
|
-
critical=
|
1017
|
-
operator
|
1018
|
-
threshold
|
1019
|
-
threshold_duration
|
1020
|
-
threshold_occurrences
|
1021
|
-
|
1022
|
-
warning=
|
1023
|
-
operator
|
1024
|
-
threshold
|
1025
|
-
threshold_duration
|
1026
|
-
threshold_occurrences
|
1027
|
-
)
|
1083
|
+
nrql={
|
1084
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1085
|
+
},
|
1086
|
+
critical={
|
1087
|
+
"operator": "above",
|
1088
|
+
"threshold": 5.5,
|
1089
|
+
"threshold_duration": 300,
|
1090
|
+
"threshold_occurrences": "ALL",
|
1091
|
+
},
|
1092
|
+
warning={
|
1093
|
+
"operator": "above",
|
1094
|
+
"threshold": 3.5,
|
1095
|
+
"threshold_duration": 600,
|
1096
|
+
"threshold_occurrences": "ALL",
|
1097
|
+
})
|
1028
1098
|
```
|
1029
1099
|
|
1030
1100
|
## Tags
|
@@ -1035,11 +1105,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1035
1105
|
import pulumi
|
1036
1106
|
import pulumi_newrelic as newrelic
|
1037
1107
|
|
1038
|
-
|
1039
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
1040
|
-
account_id=12345678,
|
1041
|
-
policy_id=
|
1108
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
1109
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
1110
|
+
account_id="12345678",
|
1111
|
+
policy_id=foo.id,
|
1042
1112
|
type="static",
|
1113
|
+
name="foo",
|
1043
1114
|
description="Alert when transactions are taking too long",
|
1044
1115
|
runbook_url="https://www.example.com",
|
1045
1116
|
enabled=True,
|
@@ -1053,35 +1124,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1053
1124
|
open_violation_on_expiration=True,
|
1054
1125
|
close_violations_on_expiration=True,
|
1055
1126
|
slide_by=30,
|
1056
|
-
nrql=
|
1057
|
-
query
|
1058
|
-
|
1059
|
-
critical=
|
1060
|
-
operator
|
1061
|
-
threshold
|
1062
|
-
threshold_duration
|
1063
|
-
threshold_occurrences
|
1064
|
-
|
1065
|
-
warning=
|
1066
|
-
operator
|
1067
|
-
threshold
|
1068
|
-
threshold_duration
|
1069
|
-
threshold_occurrences
|
1070
|
-
)
|
1071
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
1127
|
+
nrql={
|
1128
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1129
|
+
},
|
1130
|
+
critical={
|
1131
|
+
"operator": "above",
|
1132
|
+
"threshold": 5.5,
|
1133
|
+
"threshold_duration": 300,
|
1134
|
+
"threshold_occurrences": "ALL",
|
1135
|
+
},
|
1136
|
+
warning={
|
1137
|
+
"operator": "above",
|
1138
|
+
"threshold": 3.5,
|
1139
|
+
"threshold_duration": 600,
|
1140
|
+
"threshold_occurrences": "ALL",
|
1141
|
+
})
|
1142
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
1072
1143
|
guid=foo_nrql_alert_condition.entity_guid,
|
1073
1144
|
tags=[
|
1074
|
-
|
1075
|
-
key
|
1076
|
-
values
|
1145
|
+
{
|
1146
|
+
"key": "my-key",
|
1147
|
+
"values": [
|
1077
1148
|
"my-value",
|
1078
1149
|
"my-other-value",
|
1079
1150
|
],
|
1080
|
-
|
1081
|
-
|
1082
|
-
key
|
1083
|
-
values
|
1084
|
-
|
1151
|
+
},
|
1152
|
+
{
|
1153
|
+
"key": "my-key-2",
|
1154
|
+
"values": ["my-value-2"],
|
1155
|
+
},
|
1085
1156
|
])
|
1086
1157
|
```
|
1087
1158
|
|
@@ -1099,21 +1170,22 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1099
1170
|
import pulumi
|
1100
1171
|
import pulumi_newrelic as newrelic
|
1101
1172
|
|
1102
|
-
|
1103
|
-
policy_id=
|
1173
|
+
z = newrelic.NrqlAlertCondition("z",
|
1174
|
+
policy_id=z_newrelic_alert_policy["id"],
|
1175
|
+
name="zleslie-test",
|
1104
1176
|
type="static",
|
1105
1177
|
runbook_url="https://localhost",
|
1106
1178
|
enabled=True,
|
1107
1179
|
violation_time_limit="TWENTY_FOUR_HOURS",
|
1108
|
-
critical=
|
1109
|
-
operator
|
1110
|
-
threshold_duration
|
1111
|
-
threshold
|
1112
|
-
threshold_occurrences
|
1113
|
-
|
1114
|
-
nrql=
|
1115
|
-
query
|
1116
|
-
)
|
1180
|
+
critical={
|
1181
|
+
"operator": "above",
|
1182
|
+
"threshold_duration": 120,
|
1183
|
+
"threshold": 3,
|
1184
|
+
"threshold_occurrences": "AT_LEAST_ONCE",
|
1185
|
+
},
|
1186
|
+
nrql={
|
1187
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
1188
|
+
})
|
1117
1189
|
```
|
1118
1190
|
|
1119
1191
|
After making the appropriate adjustments mentioned in the deprecation warnings,
|
@@ -1123,35 +1195,36 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1123
1195
|
import pulumi
|
1124
1196
|
import pulumi_newrelic as newrelic
|
1125
1197
|
|
1126
|
-
|
1127
|
-
policy_id=
|
1198
|
+
z = newrelic.NrqlAlertCondition("z",
|
1199
|
+
policy_id=z_newrelic_alert_policy["id"],
|
1200
|
+
name="zleslie-test",
|
1128
1201
|
type="static",
|
1129
1202
|
runbook_url="https://localhost",
|
1130
1203
|
enabled=True,
|
1131
1204
|
violation_time_limit_seconds=86400,
|
1132
|
-
terms=[
|
1133
|
-
priority
|
1134
|
-
operator
|
1135
|
-
threshold
|
1136
|
-
duration
|
1137
|
-
time_function
|
1138
|
-
|
1139
|
-
nrql=
|
1140
|
-
query
|
1141
|
-
)
|
1205
|
+
terms=[{
|
1206
|
+
"priority": "critical",
|
1207
|
+
"operator": "above",
|
1208
|
+
"threshold": 3,
|
1209
|
+
"duration": 5,
|
1210
|
+
"time_function": "any",
|
1211
|
+
}],
|
1212
|
+
nrql={
|
1213
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
1214
|
+
})
|
1142
1215
|
```
|
1143
1216
|
|
1144
1217
|
## Import
|
1145
1218
|
|
1146
1219
|
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
1147
1220
|
|
1148
|
-
|
1221
|
+
// For `baseline` conditions
|
1149
1222
|
|
1150
1223
|
```sh
|
1151
1224
|
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:baseline
|
1152
1225
|
```
|
1153
1226
|
|
1154
|
-
|
1227
|
+
// For `static` conditions
|
1155
1228
|
|
1156
1229
|
```sh
|
1157
1230
|
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
|
@@ -1159,33 +1232,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1159
1232
|
|
1160
1233
|
:param str resource_name: The name of the resource.
|
1161
1234
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
1162
|
-
:param pulumi.Input[
|
1235
|
+
:param pulumi.Input[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`.
|
1163
1236
|
: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`.
|
1164
1237
|
: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`.
|
1165
1238
|
: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`.
|
1166
1239
|
: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 21600 seconds (6 hours). Default is 60 seconds.
|
1167
1240
|
: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).
|
1168
1241
|
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
1169
|
-
:param pulumi.Input[
|
1242
|
+
: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.
|
1170
1243
|
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
1171
1244
|
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
1172
1245
|
:param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
|
1173
1246
|
: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).
|
1174
1247
|
: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.
|
1175
1248
|
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
1249
|
+
:param pulumi.Input[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.
|
1176
1250
|
:param pulumi.Input[str] name: The title of the condition.
|
1177
|
-
:param pulumi.Input[
|
1251
|
+
:param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
|
1178
1252
|
:param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
1179
|
-
:param pulumi.Input[
|
1253
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
1180
1254
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
1181
1255
|
:param pulumi.Input[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`.
|
1182
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
1256
|
+
: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.
|
1257
|
+
:param pulumi.Input[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.
|
1183
1258
|
:param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
1184
1259
|
:param pulumi.Input[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>
|
1185
1260
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
1186
1261
|
: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>
|
1187
1262
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
1188
|
-
:param pulumi.Input[
|
1263
|
+
: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.
|
1189
1264
|
"""
|
1190
1265
|
...
|
1191
1266
|
@overload
|
@@ -1197,18 +1272,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1197
1272
|
Use this resource to create and manage NRQL alert conditions in New Relic.
|
1198
1273
|
|
1199
1274
|
## Example Usage
|
1275
|
+
|
1200
1276
|
### Type: `static` (default)
|
1201
1277
|
|
1202
1278
|
```python
|
1203
1279
|
import pulumi
|
1204
1280
|
import pulumi_newrelic as newrelic
|
1205
1281
|
|
1206
|
-
|
1207
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
1208
|
-
account_id=12345678,
|
1209
|
-
policy_id=
|
1282
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
1283
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
1284
|
+
account_id="12345678",
|
1285
|
+
policy_id=foo.id,
|
1210
1286
|
type="static",
|
1287
|
+
name="foo",
|
1211
1288
|
description="Alert when transactions are taking too long",
|
1289
|
+
title_template="Issue in environment: {{ json accumulations.tag.environment }}",
|
1212
1290
|
runbook_url="https://www.example.com",
|
1213
1291
|
enabled=True,
|
1214
1292
|
violation_time_limit_seconds=3600,
|
@@ -1220,28 +1298,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1220
1298
|
expiration_duration=120,
|
1221
1299
|
open_violation_on_expiration=True,
|
1222
1300
|
close_violations_on_expiration=True,
|
1301
|
+
ignore_on_expected_termination=True,
|
1223
1302
|
slide_by=30,
|
1224
|
-
nrql=
|
1225
|
-
query
|
1226
|
-
|
1227
|
-
critical=
|
1228
|
-
operator
|
1229
|
-
threshold
|
1230
|
-
threshold_duration
|
1231
|
-
threshold_occurrences
|
1232
|
-
|
1233
|
-
warning=
|
1234
|
-
operator
|
1235
|
-
threshold
|
1236
|
-
threshold_duration
|
1237
|
-
threshold_occurrences
|
1238
|
-
)
|
1303
|
+
nrql={
|
1304
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1305
|
+
},
|
1306
|
+
critical={
|
1307
|
+
"operator": "above",
|
1308
|
+
"threshold": 5.5,
|
1309
|
+
"threshold_duration": 300,
|
1310
|
+
"threshold_occurrences": "ALL",
|
1311
|
+
},
|
1312
|
+
warning={
|
1313
|
+
"operator": "above",
|
1314
|
+
"threshold": 3.5,
|
1315
|
+
"threshold_duration": 600,
|
1316
|
+
"threshold_occurrences": "ALL",
|
1317
|
+
})
|
1239
1318
|
```
|
1319
|
+
|
1240
1320
|
## NRQL
|
1241
1321
|
|
1242
1322
|
The `nrql` block supports the following arguments:
|
1243
1323
|
|
1244
1324
|
- `query` - (Required) The NRQL query to execute for the condition.
|
1325
|
+
- `data_account_id` - (Optional) **BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis.** 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.
|
1245
1326
|
- `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>
|
1246
1327
|
- `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>
|
1247
1328
|
|
@@ -1279,11 +1360,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1279
1360
|
import pulumi
|
1280
1361
|
import pulumi_newrelic as newrelic
|
1281
1362
|
|
1282
|
-
|
1283
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
1363
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
1364
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
1284
1365
|
account_id="your_account_id",
|
1285
|
-
policy_id=
|
1366
|
+
policy_id=foo.id,
|
1286
1367
|
type="static",
|
1368
|
+
name="foo",
|
1287
1369
|
description="Alert when transactions are taking too long",
|
1288
1370
|
runbook_url="https://www.example.com",
|
1289
1371
|
enabled=True,
|
@@ -1297,21 +1379,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1297
1379
|
open_violation_on_expiration=True,
|
1298
1380
|
close_violations_on_expiration=True,
|
1299
1381
|
slide_by=30,
|
1300
|
-
nrql=
|
1301
|
-
query
|
1302
|
-
|
1303
|
-
critical=
|
1304
|
-
operator
|
1305
|
-
threshold
|
1306
|
-
threshold_duration
|
1307
|
-
threshold_occurrences
|
1308
|
-
|
1309
|
-
warning=
|
1310
|
-
operator
|
1311
|
-
threshold
|
1312
|
-
threshold_duration
|
1313
|
-
threshold_occurrences
|
1314
|
-
)
|
1382
|
+
nrql={
|
1383
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1384
|
+
},
|
1385
|
+
critical={
|
1386
|
+
"operator": "above",
|
1387
|
+
"threshold": 5.5,
|
1388
|
+
"threshold_duration": 300,
|
1389
|
+
"threshold_occurrences": "ALL",
|
1390
|
+
},
|
1391
|
+
warning={
|
1392
|
+
"operator": "above",
|
1393
|
+
"threshold": 3.5,
|
1394
|
+
"threshold_duration": 600,
|
1395
|
+
"threshold_occurrences": "ALL",
|
1396
|
+
})
|
1315
1397
|
```
|
1316
1398
|
|
1317
1399
|
## Tags
|
@@ -1322,11 +1404,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1322
1404
|
import pulumi
|
1323
1405
|
import pulumi_newrelic as newrelic
|
1324
1406
|
|
1325
|
-
|
1326
|
-
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("
|
1327
|
-
account_id=12345678,
|
1328
|
-
policy_id=
|
1407
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
1408
|
+
foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
|
1409
|
+
account_id="12345678",
|
1410
|
+
policy_id=foo.id,
|
1329
1411
|
type="static",
|
1412
|
+
name="foo",
|
1330
1413
|
description="Alert when transactions are taking too long",
|
1331
1414
|
runbook_url="https://www.example.com",
|
1332
1415
|
enabled=True,
|
@@ -1340,35 +1423,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1340
1423
|
open_violation_on_expiration=True,
|
1341
1424
|
close_violations_on_expiration=True,
|
1342
1425
|
slide_by=30,
|
1343
|
-
nrql=
|
1344
|
-
query
|
1345
|
-
|
1346
|
-
critical=
|
1347
|
-
operator
|
1348
|
-
threshold
|
1349
|
-
threshold_duration
|
1350
|
-
threshold_occurrences
|
1351
|
-
|
1352
|
-
warning=
|
1353
|
-
operator
|
1354
|
-
threshold
|
1355
|
-
threshold_duration
|
1356
|
-
threshold_occurrences
|
1357
|
-
)
|
1358
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
1426
|
+
nrql={
|
1427
|
+
"query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
|
1428
|
+
},
|
1429
|
+
critical={
|
1430
|
+
"operator": "above",
|
1431
|
+
"threshold": 5.5,
|
1432
|
+
"threshold_duration": 300,
|
1433
|
+
"threshold_occurrences": "ALL",
|
1434
|
+
},
|
1435
|
+
warning={
|
1436
|
+
"operator": "above",
|
1437
|
+
"threshold": 3.5,
|
1438
|
+
"threshold_duration": 600,
|
1439
|
+
"threshold_occurrences": "ALL",
|
1440
|
+
})
|
1441
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
1359
1442
|
guid=foo_nrql_alert_condition.entity_guid,
|
1360
1443
|
tags=[
|
1361
|
-
|
1362
|
-
key
|
1363
|
-
values
|
1444
|
+
{
|
1445
|
+
"key": "my-key",
|
1446
|
+
"values": [
|
1364
1447
|
"my-value",
|
1365
1448
|
"my-other-value",
|
1366
1449
|
],
|
1367
|
-
|
1368
|
-
|
1369
|
-
key
|
1370
|
-
values
|
1371
|
-
|
1450
|
+
},
|
1451
|
+
{
|
1452
|
+
"key": "my-key-2",
|
1453
|
+
"values": ["my-value-2"],
|
1454
|
+
},
|
1372
1455
|
])
|
1373
1456
|
```
|
1374
1457
|
|
@@ -1386,21 +1469,22 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1386
1469
|
import pulumi
|
1387
1470
|
import pulumi_newrelic as newrelic
|
1388
1471
|
|
1389
|
-
|
1390
|
-
policy_id=
|
1472
|
+
z = newrelic.NrqlAlertCondition("z",
|
1473
|
+
policy_id=z_newrelic_alert_policy["id"],
|
1474
|
+
name="zleslie-test",
|
1391
1475
|
type="static",
|
1392
1476
|
runbook_url="https://localhost",
|
1393
1477
|
enabled=True,
|
1394
1478
|
violation_time_limit="TWENTY_FOUR_HOURS",
|
1395
|
-
critical=
|
1396
|
-
operator
|
1397
|
-
threshold_duration
|
1398
|
-
threshold
|
1399
|
-
threshold_occurrences
|
1400
|
-
|
1401
|
-
nrql=
|
1402
|
-
query
|
1403
|
-
)
|
1479
|
+
critical={
|
1480
|
+
"operator": "above",
|
1481
|
+
"threshold_duration": 120,
|
1482
|
+
"threshold": 3,
|
1483
|
+
"threshold_occurrences": "AT_LEAST_ONCE",
|
1484
|
+
},
|
1485
|
+
nrql={
|
1486
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
1487
|
+
})
|
1404
1488
|
```
|
1405
1489
|
|
1406
1490
|
After making the appropriate adjustments mentioned in the deprecation warnings,
|
@@ -1410,35 +1494,36 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1410
1494
|
import pulumi
|
1411
1495
|
import pulumi_newrelic as newrelic
|
1412
1496
|
|
1413
|
-
|
1414
|
-
policy_id=
|
1497
|
+
z = newrelic.NrqlAlertCondition("z",
|
1498
|
+
policy_id=z_newrelic_alert_policy["id"],
|
1499
|
+
name="zleslie-test",
|
1415
1500
|
type="static",
|
1416
1501
|
runbook_url="https://localhost",
|
1417
1502
|
enabled=True,
|
1418
1503
|
violation_time_limit_seconds=86400,
|
1419
|
-
terms=[
|
1420
|
-
priority
|
1421
|
-
operator
|
1422
|
-
threshold
|
1423
|
-
duration
|
1424
|
-
time_function
|
1425
|
-
|
1426
|
-
nrql=
|
1427
|
-
query
|
1428
|
-
)
|
1504
|
+
terms=[{
|
1505
|
+
"priority": "critical",
|
1506
|
+
"operator": "above",
|
1507
|
+
"threshold": 3,
|
1508
|
+
"duration": 5,
|
1509
|
+
"time_function": "any",
|
1510
|
+
}],
|
1511
|
+
nrql={
|
1512
|
+
"query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
|
1513
|
+
})
|
1429
1514
|
```
|
1430
1515
|
|
1431
1516
|
## Import
|
1432
1517
|
|
1433
1518
|
NRQL alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>:<conditionType>`, e.g.
|
1434
1519
|
|
1435
|
-
|
1520
|
+
// For `baseline` conditions
|
1436
1521
|
|
1437
1522
|
```sh
|
1438
1523
|
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:baseline
|
1439
1524
|
```
|
1440
1525
|
|
1441
|
-
|
1526
|
+
// For `static` conditions
|
1442
1527
|
|
1443
1528
|
```sh
|
1444
1529
|
$ pulumi import newrelic:index/nrqlAlertCondition:NrqlAlertCondition foo 538291:6789035:static
|
@@ -1459,31 +1544,33 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1459
1544
|
def _internal_init(__self__,
|
1460
1545
|
resource_name: str,
|
1461
1546
|
opts: Optional[pulumi.ResourceOptions] = None,
|
1462
|
-
account_id: Optional[pulumi.Input[
|
1547
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
1463
1548
|
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
1464
1549
|
aggregation_method: Optional[pulumi.Input[str]] = None,
|
1465
1550
|
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
1466
1551
|
aggregation_window: Optional[pulumi.Input[int]] = None,
|
1467
1552
|
baseline_direction: Optional[pulumi.Input[str]] = None,
|
1468
1553
|
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
1469
|
-
critical: Optional[pulumi.Input[
|
1554
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
1470
1555
|
description: Optional[pulumi.Input[str]] = None,
|
1471
1556
|
enabled: Optional[pulumi.Input[bool]] = None,
|
1472
1557
|
evaluation_delay: Optional[pulumi.Input[int]] = None,
|
1473
1558
|
expiration_duration: Optional[pulumi.Input[int]] = None,
|
1474
1559
|
fill_option: Optional[pulumi.Input[str]] = None,
|
1475
1560
|
fill_value: Optional[pulumi.Input[float]] = None,
|
1561
|
+
ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
|
1476
1562
|
name: Optional[pulumi.Input[str]] = None,
|
1477
|
-
nrql: Optional[pulumi.Input[
|
1563
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
1478
1564
|
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
1479
|
-
policy_id: Optional[pulumi.Input[
|
1565
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
1480
1566
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
1481
1567
|
slide_by: Optional[pulumi.Input[int]] = None,
|
1482
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
1568
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
1569
|
+
title_template: Optional[pulumi.Input[str]] = None,
|
1483
1570
|
type: Optional[pulumi.Input[str]] = None,
|
1484
1571
|
violation_time_limit: Optional[pulumi.Input[str]] = None,
|
1485
1572
|
violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
|
1486
|
-
warning: Optional[pulumi.Input[
|
1573
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
|
1487
1574
|
__props__=None):
|
1488
1575
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
1489
1576
|
if not isinstance(opts, pulumi.ResourceOptions):
|
@@ -1507,6 +1594,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1507
1594
|
__props__.__dict__["expiration_duration"] = expiration_duration
|
1508
1595
|
__props__.__dict__["fill_option"] = fill_option
|
1509
1596
|
__props__.__dict__["fill_value"] = fill_value
|
1597
|
+
__props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
|
1510
1598
|
__props__.__dict__["name"] = name
|
1511
1599
|
if nrql is None and not opts.urn:
|
1512
1600
|
raise TypeError("Missing required property 'nrql'")
|
@@ -1518,6 +1606,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1518
1606
|
__props__.__dict__["runbook_url"] = runbook_url
|
1519
1607
|
__props__.__dict__["slide_by"] = slide_by
|
1520
1608
|
__props__.__dict__["terms"] = terms
|
1609
|
+
__props__.__dict__["title_template"] = title_template
|
1521
1610
|
__props__.__dict__["type"] = type
|
1522
1611
|
__props__.__dict__["violation_time_limit"] = violation_time_limit
|
1523
1612
|
__props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
|
@@ -1533,14 +1622,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1533
1622
|
def get(resource_name: str,
|
1534
1623
|
id: pulumi.Input[str],
|
1535
1624
|
opts: Optional[pulumi.ResourceOptions] = None,
|
1536
|
-
account_id: Optional[pulumi.Input[
|
1625
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
1537
1626
|
aggregation_delay: Optional[pulumi.Input[str]] = None,
|
1538
1627
|
aggregation_method: Optional[pulumi.Input[str]] = None,
|
1539
1628
|
aggregation_timer: Optional[pulumi.Input[str]] = None,
|
1540
1629
|
aggregation_window: Optional[pulumi.Input[int]] = None,
|
1541
1630
|
baseline_direction: Optional[pulumi.Input[str]] = None,
|
1542
1631
|
close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
|
1543
|
-
critical: Optional[pulumi.Input[
|
1632
|
+
critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
|
1544
1633
|
description: Optional[pulumi.Input[str]] = None,
|
1545
1634
|
enabled: Optional[pulumi.Input[bool]] = None,
|
1546
1635
|
entity_guid: Optional[pulumi.Input[str]] = None,
|
@@ -1548,17 +1637,19 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1548
1637
|
expiration_duration: Optional[pulumi.Input[int]] = None,
|
1549
1638
|
fill_option: Optional[pulumi.Input[str]] = None,
|
1550
1639
|
fill_value: Optional[pulumi.Input[float]] = None,
|
1640
|
+
ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
|
1551
1641
|
name: Optional[pulumi.Input[str]] = None,
|
1552
|
-
nrql: Optional[pulumi.Input[
|
1642
|
+
nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
|
1553
1643
|
open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
|
1554
|
-
policy_id: Optional[pulumi.Input[
|
1644
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
1555
1645
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
1556
1646
|
slide_by: Optional[pulumi.Input[int]] = None,
|
1557
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
1647
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
|
1648
|
+
title_template: Optional[pulumi.Input[str]] = None,
|
1558
1649
|
type: Optional[pulumi.Input[str]] = None,
|
1559
1650
|
violation_time_limit: Optional[pulumi.Input[str]] = None,
|
1560
1651
|
violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
|
1561
|
-
warning: Optional[pulumi.Input[
|
1652
|
+
warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None) -> 'NrqlAlertCondition':
|
1562
1653
|
"""
|
1563
1654
|
Get an existing NrqlAlertCondition resource's state with the given name, id, and optional extra
|
1564
1655
|
properties used to qualify the lookup.
|
@@ -1566,14 +1657,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1566
1657
|
:param str resource_name: The unique name of the resulting resource.
|
1567
1658
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
1568
1659
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
1569
|
-
:param pulumi.Input[
|
1660
|
+
:param pulumi.Input[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`.
|
1570
1661
|
: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`.
|
1571
1662
|
: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`.
|
1572
1663
|
: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`.
|
1573
1664
|
: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 21600 seconds (6 hours). Default is 60 seconds.
|
1574
1665
|
: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).
|
1575
1666
|
:param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
|
1576
|
-
:param pulumi.Input[
|
1667
|
+
: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.
|
1577
1668
|
:param pulumi.Input[str] description: The description of the NRQL alert condition.
|
1578
1669
|
:param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
|
1579
1670
|
:param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
|
@@ -1581,19 +1672,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1581
1672
|
: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).
|
1582
1673
|
: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.
|
1583
1674
|
:param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
|
1675
|
+
:param pulumi.Input[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.
|
1584
1676
|
:param pulumi.Input[str] name: The title of the condition.
|
1585
|
-
:param pulumi.Input[
|
1677
|
+
:param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
|
1586
1678
|
:param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
|
1587
|
-
:param pulumi.Input[
|
1679
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
1588
1680
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
1589
1681
|
:param pulumi.Input[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`.
|
1590
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
1682
|
+
: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.
|
1683
|
+
:param pulumi.Input[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.
|
1591
1684
|
:param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
|
1592
1685
|
:param pulumi.Input[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>
|
1593
1686
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
1594
1687
|
: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>
|
1595
1688
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
1596
|
-
:param pulumi.Input[
|
1689
|
+
: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.
|
1597
1690
|
"""
|
1598
1691
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
1599
1692
|
|
@@ -1614,6 +1707,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1614
1707
|
__props__.__dict__["expiration_duration"] = expiration_duration
|
1615
1708
|
__props__.__dict__["fill_option"] = fill_option
|
1616
1709
|
__props__.__dict__["fill_value"] = fill_value
|
1710
|
+
__props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
|
1617
1711
|
__props__.__dict__["name"] = name
|
1618
1712
|
__props__.__dict__["nrql"] = nrql
|
1619
1713
|
__props__.__dict__["open_violation_on_expiration"] = open_violation_on_expiration
|
@@ -1621,6 +1715,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1621
1715
|
__props__.__dict__["runbook_url"] = runbook_url
|
1622
1716
|
__props__.__dict__["slide_by"] = slide_by
|
1623
1717
|
__props__.__dict__["terms"] = terms
|
1718
|
+
__props__.__dict__["title_template"] = title_template
|
1624
1719
|
__props__.__dict__["type"] = type
|
1625
1720
|
__props__.__dict__["violation_time_limit"] = violation_time_limit
|
1626
1721
|
__props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
|
@@ -1629,7 +1724,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1629
1724
|
|
1630
1725
|
@property
|
1631
1726
|
@pulumi.getter(name="accountId")
|
1632
|
-
def account_id(self) -> pulumi.Output[
|
1727
|
+
def account_id(self) -> pulumi.Output[str]:
|
1633
1728
|
"""
|
1634
1729
|
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`.
|
1635
1730
|
"""
|
@@ -1747,6 +1842,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1747
1842
|
"""
|
1748
1843
|
return pulumi.get(self, "fill_value")
|
1749
1844
|
|
1845
|
+
@property
|
1846
|
+
@pulumi.getter(name="ignoreOnExpectedTermination")
|
1847
|
+
def ignore_on_expected_termination(self) -> pulumi.Output[Optional[bool]]:
|
1848
|
+
"""
|
1849
|
+
Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
|
1850
|
+
"""
|
1851
|
+
return pulumi.get(self, "ignore_on_expected_termination")
|
1852
|
+
|
1750
1853
|
@property
|
1751
1854
|
@pulumi.getter
|
1752
1855
|
def name(self) -> pulumi.Output[str]:
|
@@ -1773,7 +1876,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1773
1876
|
|
1774
1877
|
@property
|
1775
1878
|
@pulumi.getter(name="policyId")
|
1776
|
-
def policy_id(self) -> pulumi.Output[
|
1879
|
+
def policy_id(self) -> pulumi.Output[str]:
|
1777
1880
|
"""
|
1778
1881
|
The ID of the policy where this condition should be used.
|
1779
1882
|
"""
|
@@ -1797,15 +1900,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1797
1900
|
|
1798
1901
|
@property
|
1799
1902
|
@pulumi.getter
|
1903
|
+
@_utilities.deprecated("""use `critical` and `warning` attributes instead""")
|
1800
1904
|
def terms(self) -> pulumi.Output[Optional[Sequence['outputs.NrqlAlertConditionTerm']]]:
|
1801
1905
|
"""
|
1802
1906
|
**DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
|
1803
1907
|
"""
|
1804
|
-
warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
|
1805
|
-
pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
|
1806
|
-
|
1807
1908
|
return pulumi.get(self, "terms")
|
1808
1909
|
|
1910
|
+
@property
|
1911
|
+
@pulumi.getter(name="titleTemplate")
|
1912
|
+
def title_template(self) -> pulumi.Output[Optional[str]]:
|
1913
|
+
"""
|
1914
|
+
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.
|
1915
|
+
"""
|
1916
|
+
return pulumi.get(self, "title_template")
|
1917
|
+
|
1809
1918
|
@property
|
1810
1919
|
@pulumi.getter
|
1811
1920
|
def type(self) -> pulumi.Output[Optional[str]]:
|
@@ -1816,14 +1925,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
|
|
1816
1925
|
|
1817
1926
|
@property
|
1818
1927
|
@pulumi.getter(name="violationTimeLimit")
|
1928
|
+
@_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
|
1819
1929
|
def violation_time_limit(self) -> pulumi.Output[str]:
|
1820
1930
|
"""
|
1821
1931
|
**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>
|
1822
1932
|
<small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
|
1823
1933
|
"""
|
1824
|
-
warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
|
1825
|
-
pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
|
1826
|
-
|
1827
1934
|
return pulumi.get(self, "violation_time_limit")
|
1828
1935
|
|
1829
1936
|
@property
|