@pulumi/newrelic 5.13.0 → 5.13.1
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.
package/alertCondition.d.ts
CHANGED
|
@@ -172,7 +172,9 @@ export declare class AlertCondition extends pulumi.CustomResource {
|
|
|
172
172
|
*/
|
|
173
173
|
readonly userDefinedValueFunction: pulumi.Output<string | undefined>;
|
|
174
174
|
/**
|
|
175
|
-
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be
|
|
175
|
+
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
176
|
+
* * when `type` = `apmAppMetric` and `conditionScope` = `instance`
|
|
177
|
+
* * when `type` = `apmJvmMetric`
|
|
176
178
|
*/
|
|
177
179
|
readonly violationCloseTimer: pulumi.Output<number | undefined>;
|
|
178
180
|
/**
|
|
@@ -247,7 +249,9 @@ export interface AlertConditionState {
|
|
|
247
249
|
*/
|
|
248
250
|
userDefinedValueFunction?: pulumi.Input<string>;
|
|
249
251
|
/**
|
|
250
|
-
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be
|
|
252
|
+
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
253
|
+
* * when `type` = `apmAppMetric` and `conditionScope` = `instance`
|
|
254
|
+
* * when `type` = `apmJvmMetric`
|
|
251
255
|
*/
|
|
252
256
|
violationCloseTimer?: pulumi.Input<number>;
|
|
253
257
|
}
|
|
@@ -310,7 +314,9 @@ export interface AlertConditionArgs {
|
|
|
310
314
|
*/
|
|
311
315
|
userDefinedValueFunction?: pulumi.Input<string>;
|
|
312
316
|
/**
|
|
313
|
-
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be
|
|
317
|
+
* Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
318
|
+
* * when `type` = `apmAppMetric` and `conditionScope` = `instance`
|
|
319
|
+
* * when `type` = `apmJvmMetric`
|
|
314
320
|
*/
|
|
315
321
|
violationCloseTimer?: pulumi.Input<number>;
|
|
316
322
|
}
|
package/alertCondition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alertCondition.js","sourceRoot":"","sources":["../alertCondition.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,cAAc,CAAC,YAAY,CAAC;IAC/D,CAAC;
|
|
1
|
+
{"version":3,"file":"alertCondition.js","sourceRoot":"","sources":["../alertCondition.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,MAAa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
6
6
|
*
|
|
7
|
-
* Firstly set up your service level objective, we recommend
|
|
7
|
+
* Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
|
|
8
8
|
*
|
|
9
9
|
* ```typescript
|
|
10
10
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -21,9 +21,9 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
21
21
|
* from: "Transaction",
|
|
22
22
|
* where: "appName = 'Example application' AND (transactionType='Web')",
|
|
23
23
|
* },
|
|
24
|
-
*
|
|
24
|
+
* badEvents: {
|
|
25
25
|
* from: "Transaction",
|
|
26
|
-
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration
|
|
26
|
+
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
|
27
27
|
* },
|
|
28
28
|
* },
|
|
29
29
|
* objective: {
|
|
@@ -38,6 +38,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
38
38
|
* });
|
|
39
39
|
* ```
|
|
40
40
|
* Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
|
41
|
+
* Note that the Service Level was set up using bad events, that's why `isBadEvents` is set to `true`.
|
|
42
|
+
* If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
|
|
41
43
|
*
|
|
42
44
|
* ```typescript
|
|
43
45
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -50,6 +52,7 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
50
52
|
* sloPeriod: local.foo_period,
|
|
51
53
|
* customToleratedBudgetConsumption: 5,
|
|
52
54
|
* customEvaluationPeriod: 90,
|
|
55
|
+
* isBadEvents: true,
|
|
53
56
|
* });
|
|
54
57
|
* const yourCondition = new newrelic.NrqlAlertCondition("yourCondition", {
|
|
55
58
|
* accountId: 12345678,
|
|
@@ -91,6 +94,10 @@ export interface GetServiceLevelAlertHelperArgs {
|
|
|
91
94
|
* How much budget you tolerate to consume during the custom evaluation period, valid values between `0` and `100`. Mandatory if `alertType` is `custom`.
|
|
92
95
|
*/
|
|
93
96
|
customToleratedBudgetConsumption?: number;
|
|
97
|
+
/**
|
|
98
|
+
* If the SLI is defined using bad events. Defaults to `false`
|
|
99
|
+
*/
|
|
100
|
+
isBadEvents?: boolean;
|
|
94
101
|
/**
|
|
95
102
|
* The guid of the sli we want to set the alert on.
|
|
96
103
|
*/
|
|
@@ -119,6 +126,7 @@ export interface GetServiceLevelAlertHelperResult {
|
|
|
119
126
|
* The provider-assigned unique ID for this managed resource.
|
|
120
127
|
*/
|
|
121
128
|
readonly id: string;
|
|
129
|
+
readonly isBadEvents?: boolean;
|
|
122
130
|
/**
|
|
123
131
|
* (Computed) The nrql query for the selected type of alert.
|
|
124
132
|
*/
|
|
@@ -140,7 +148,7 @@ export interface GetServiceLevelAlertHelperResult {
|
|
|
140
148
|
*
|
|
141
149
|
* ## Example Usage
|
|
142
150
|
*
|
|
143
|
-
* Firstly set up your service level objective, we recommend
|
|
151
|
+
* Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
|
|
144
152
|
*
|
|
145
153
|
* ```typescript
|
|
146
154
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -157,9 +165,9 @@ export interface GetServiceLevelAlertHelperResult {
|
|
|
157
165
|
* from: "Transaction",
|
|
158
166
|
* where: "appName = 'Example application' AND (transactionType='Web')",
|
|
159
167
|
* },
|
|
160
|
-
*
|
|
168
|
+
* badEvents: {
|
|
161
169
|
* from: "Transaction",
|
|
162
|
-
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration
|
|
170
|
+
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
|
163
171
|
* },
|
|
164
172
|
* },
|
|
165
173
|
* objective: {
|
|
@@ -174,6 +182,8 @@ export interface GetServiceLevelAlertHelperResult {
|
|
|
174
182
|
* });
|
|
175
183
|
* ```
|
|
176
184
|
* Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
|
185
|
+
* Note that the Service Level was set up using bad events, that's why `isBadEvents` is set to `true`.
|
|
186
|
+
* If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
|
|
177
187
|
*
|
|
178
188
|
* ```typescript
|
|
179
189
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -186,6 +196,7 @@ export interface GetServiceLevelAlertHelperResult {
|
|
|
186
196
|
* sloPeriod: local.foo_period,
|
|
187
197
|
* customToleratedBudgetConsumption: 5,
|
|
188
198
|
* customEvaluationPeriod: 90,
|
|
199
|
+
* isBadEvents: true,
|
|
189
200
|
* });
|
|
190
201
|
* const yourCondition = new newrelic.NrqlAlertCondition("yourCondition", {
|
|
191
202
|
* accountId: 12345678,
|
|
@@ -227,6 +238,10 @@ export interface GetServiceLevelAlertHelperOutputArgs {
|
|
|
227
238
|
* How much budget you tolerate to consume during the custom evaluation period, valid values between `0` and `100`. Mandatory if `alertType` is `custom`.
|
|
228
239
|
*/
|
|
229
240
|
customToleratedBudgetConsumption?: pulumi.Input<number>;
|
|
241
|
+
/**
|
|
242
|
+
* If the SLI is defined using bad events. Defaults to `false`
|
|
243
|
+
*/
|
|
244
|
+
isBadEvents?: pulumi.Input<boolean>;
|
|
230
245
|
/**
|
|
231
246
|
* The guid of the sli we want to set the alert on.
|
|
232
247
|
*/
|
|
@@ -10,7 +10,7 @@ const utilities = require("./utilities");
|
|
|
10
10
|
*
|
|
11
11
|
* ## Example Usage
|
|
12
12
|
*
|
|
13
|
-
* Firstly set up your service level objective, we recommend
|
|
13
|
+
* Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
|
|
14
14
|
*
|
|
15
15
|
* ```typescript
|
|
16
16
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -27,9 +27,9 @@ const utilities = require("./utilities");
|
|
|
27
27
|
* from: "Transaction",
|
|
28
28
|
* where: "appName = 'Example application' AND (transactionType='Web')",
|
|
29
29
|
* },
|
|
30
|
-
*
|
|
30
|
+
* badEvents: {
|
|
31
31
|
* from: "Transaction",
|
|
32
|
-
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration
|
|
32
|
+
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
|
33
33
|
* },
|
|
34
34
|
* },
|
|
35
35
|
* objective: {
|
|
@@ -44,6 +44,8 @@ const utilities = require("./utilities");
|
|
|
44
44
|
* });
|
|
45
45
|
* ```
|
|
46
46
|
* Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
|
47
|
+
* Note that the Service Level was set up using bad events, that's why `isBadEvents` is set to `true`.
|
|
48
|
+
* If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
|
|
47
49
|
*
|
|
48
50
|
* ```typescript
|
|
49
51
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -56,6 +58,7 @@ const utilities = require("./utilities");
|
|
|
56
58
|
* sloPeriod: local.foo_period,
|
|
57
59
|
* customToleratedBudgetConsumption: 5,
|
|
58
60
|
* customEvaluationPeriod: 90,
|
|
61
|
+
* isBadEvents: true,
|
|
59
62
|
* });
|
|
60
63
|
* const yourCondition = new newrelic.NrqlAlertCondition("yourCondition", {
|
|
61
64
|
* accountId: 12345678,
|
|
@@ -86,6 +89,7 @@ function getServiceLevelAlertHelper(args, opts) {
|
|
|
86
89
|
"alertType": args.alertType,
|
|
87
90
|
"customEvaluationPeriod": args.customEvaluationPeriod,
|
|
88
91
|
"customToleratedBudgetConsumption": args.customToleratedBudgetConsumption,
|
|
92
|
+
"isBadEvents": args.isBadEvents,
|
|
89
93
|
"sliGuid": args.sliGuid,
|
|
90
94
|
"sloPeriod": args.sloPeriod,
|
|
91
95
|
"sloTarget": args.sloTarget,
|
|
@@ -97,7 +101,7 @@ exports.getServiceLevelAlertHelper = getServiceLevelAlertHelper;
|
|
|
97
101
|
*
|
|
98
102
|
* ## Example Usage
|
|
99
103
|
*
|
|
100
|
-
* Firstly set up your service level objective, we recommend
|
|
104
|
+
* Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
|
|
101
105
|
*
|
|
102
106
|
* ```typescript
|
|
103
107
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -114,9 +118,9 @@ exports.getServiceLevelAlertHelper = getServiceLevelAlertHelper;
|
|
|
114
118
|
* from: "Transaction",
|
|
115
119
|
* where: "appName = 'Example application' AND (transactionType='Web')",
|
|
116
120
|
* },
|
|
117
|
-
*
|
|
121
|
+
* badEvents: {
|
|
118
122
|
* from: "Transaction",
|
|
119
|
-
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration
|
|
123
|
+
* where: "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
|
120
124
|
* },
|
|
121
125
|
* },
|
|
122
126
|
* objective: {
|
|
@@ -131,6 +135,8 @@ exports.getServiceLevelAlertHelper = getServiceLevelAlertHelper;
|
|
|
131
135
|
* });
|
|
132
136
|
* ```
|
|
133
137
|
* Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
|
138
|
+
* Note that the Service Level was set up using bad events, that's why `isBadEvents` is set to `true`.
|
|
139
|
+
* If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
|
|
134
140
|
*
|
|
135
141
|
* ```typescript
|
|
136
142
|
* import * as pulumi from "@pulumi/pulumi";
|
|
@@ -143,6 +149,7 @@ exports.getServiceLevelAlertHelper = getServiceLevelAlertHelper;
|
|
|
143
149
|
* sloPeriod: local.foo_period,
|
|
144
150
|
* customToleratedBudgetConsumption: 5,
|
|
145
151
|
* customEvaluationPeriod: 90,
|
|
152
|
+
* isBadEvents: true,
|
|
146
153
|
* });
|
|
147
154
|
* const yourCondition = new newrelic.NrqlAlertCondition("yourCondition", {
|
|
148
155
|
* accountId: 12345678,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getServiceLevelAlertHelper.js","sourceRoot":"","sources":["../getServiceLevelAlertHelper.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"getServiceLevelAlertHelper.js","sourceRoot":"","sources":["../getServiceLevelAlertHelper.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,SAAgB,0BAA0B,CAAC,IAAoC,EAAE,IAA2B;IAExG,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,sEAAsE,EAAE;QACjG,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,wBAAwB,EAAE,IAAI,CAAC,sBAAsB;QACrD,kCAAkC,EAAE,IAAI,CAAC,gCAAgC;QACzE,aAAa,EAAE,IAAI,CAAC,WAAW;QAC/B,SAAS,EAAE,IAAI,CAAC,OAAO;QACvB,WAAW,EAAE,IAAI,CAAC,SAAS;QAC3B,WAAW,EAAE,IAAI,CAAC,SAAS;KAC9B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAZD,gEAYC;AAoED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,SAAgB,gCAAgC,CAAC,IAA0C,EAAE,IAA2B;IACpH,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACrF,CAAC;AAFD,4EAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/newrelic",
|
|
3
|
-
"version": "v5.13.
|
|
3
|
+
"version": "v5.13.1",
|
|
4
4
|
"description": "A Pulumi package for creating and managing New Relic resources.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pulumi",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc",
|
|
14
|
-
"install": "node scripts/install-pulumi-plugin.js resource newrelic v5.13.
|
|
14
|
+
"install": "node scripts/install-pulumi-plugin.js resource newrelic v5.13.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@pulumi/pulumi": "^3.0.0"
|