@pulumiverse/grafana 2.14.1 → 2.15.0-alpha.1762961903
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/alerting/alertRuleV0Alpha1.d.ts +170 -0
- package/alerting/alertRuleV0Alpha1.js +149 -0
- package/alerting/alertRuleV0Alpha1.js.map +1 -0
- package/alerting/index.d.ts +6 -0
- package/alerting/index.js +11 -1
- package/alerting/index.js.map +1 -1
- package/alerting/recordingRuleV0Alpha1.d.ts +125 -0
- package/alerting/recordingRuleV0Alpha1.js +104 -0
- package/alerting/recordingRuleV0Alpha1.js.map +1 -0
- package/fleetmanagement/collector.d.ts +2 -0
- package/fleetmanagement/collector.js +2 -0
- package/fleetmanagement/collector.js.map +1 -1
- package/package.json +2 -2
- package/types/input.d.ts +200 -0
- package/types/output.d.ts +200 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages Grafana Alert Rules.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
12
|
+
*
|
|
13
|
+
* const alertruleFolder = new grafana.oss.Folder("alertrule_folder", {title: "Alert Rule Folder"});
|
|
14
|
+
* const example = new grafana.alerting.AlertRuleV0Alpha1("example", {
|
|
15
|
+
* metadata: {
|
|
16
|
+
* uid: "example-alert-rule",
|
|
17
|
+
* folderUid: alertruleFolder.uid,
|
|
18
|
+
* },
|
|
19
|
+
* spec: {
|
|
20
|
+
* title: "Example Alert Rule",
|
|
21
|
+
* trigger: {
|
|
22
|
+
* interval: "1m",
|
|
23
|
+
* },
|
|
24
|
+
* paused: true,
|
|
25
|
+
* expressions: {
|
|
26
|
+
* A: {
|
|
27
|
+
* model: {
|
|
28
|
+
* datasource: {
|
|
29
|
+
* type: "prometheus",
|
|
30
|
+
* uid: "ds_uid",
|
|
31
|
+
* },
|
|
32
|
+
* editorMode: "code",
|
|
33
|
+
* expr: "count(up{})",
|
|
34
|
+
* instant: true,
|
|
35
|
+
* intervalMs: 1000,
|
|
36
|
+
* legendFormat: "__auto",
|
|
37
|
+
* maxDataPoints: 43200,
|
|
38
|
+
* range: false,
|
|
39
|
+
* refId: "A",
|
|
40
|
+
* },
|
|
41
|
+
* datasourceUid: "ds_uid",
|
|
42
|
+
* relativeTimeRange: {
|
|
43
|
+
* from: "600s",
|
|
44
|
+
* to: "0s",
|
|
45
|
+
* },
|
|
46
|
+
* queryType: "",
|
|
47
|
+
* source: true,
|
|
48
|
+
* },
|
|
49
|
+
* B: {
|
|
50
|
+
* model: {
|
|
51
|
+
* conditions: [{
|
|
52
|
+
* evaluator: {
|
|
53
|
+
* params: [1],
|
|
54
|
+
* type: "gt",
|
|
55
|
+
* },
|
|
56
|
+
* operator: {
|
|
57
|
+
* type: "and",
|
|
58
|
+
* },
|
|
59
|
+
* query: {
|
|
60
|
+
* params: ["C"],
|
|
61
|
+
* },
|
|
62
|
+
* reducer: {
|
|
63
|
+
* params: [],
|
|
64
|
+
* type: "last",
|
|
65
|
+
* },
|
|
66
|
+
* type: "query",
|
|
67
|
+
* }],
|
|
68
|
+
* datasource: {
|
|
69
|
+
* type: "__expr__",
|
|
70
|
+
* uid: "__expr__",
|
|
71
|
+
* },
|
|
72
|
+
* expression: "A",
|
|
73
|
+
* intervalMs: 1000,
|
|
74
|
+
* maxDataPoints: 43200,
|
|
75
|
+
* refId: "C",
|
|
76
|
+
* type: "threshold",
|
|
77
|
+
* },
|
|
78
|
+
* datasourceUid: "__expr__",
|
|
79
|
+
* queryType: "",
|
|
80
|
+
* source: false,
|
|
81
|
+
* },
|
|
82
|
+
* },
|
|
83
|
+
* "for": "5m",
|
|
84
|
+
* labels: {
|
|
85
|
+
* severity: "critical",
|
|
86
|
+
* },
|
|
87
|
+
* annotations: {
|
|
88
|
+
* runbook_url: "https://example.com",
|
|
89
|
+
* },
|
|
90
|
+
* noDataState: "KeepLast",
|
|
91
|
+
* execErrState: "KeepLast",
|
|
92
|
+
* missingSeriesEvalsToResolve: 5,
|
|
93
|
+
* notificationSettings: {
|
|
94
|
+
* contactPoint: "grafana-default-email",
|
|
95
|
+
* },
|
|
96
|
+
* },
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export declare class AlertRuleV0Alpha1 extends pulumi.CustomResource {
|
|
101
|
+
/**
|
|
102
|
+
* Get an existing AlertRuleV0Alpha1 resource's state with the given name, ID, and optional extra
|
|
103
|
+
* properties used to qualify the lookup.
|
|
104
|
+
*
|
|
105
|
+
* @param name The _unique_ name of the resulting resource.
|
|
106
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
107
|
+
* @param state Any extra arguments used during the lookup.
|
|
108
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
109
|
+
*/
|
|
110
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertRuleV0Alpha1State, opts?: pulumi.CustomResourceOptions): AlertRuleV0Alpha1;
|
|
111
|
+
/**
|
|
112
|
+
* Returns true if the given object is an instance of AlertRuleV0Alpha1. This is designed to work even
|
|
113
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
114
|
+
*/
|
|
115
|
+
static isInstance(obj: any): obj is AlertRuleV0Alpha1;
|
|
116
|
+
/**
|
|
117
|
+
* The metadata of the resource.
|
|
118
|
+
*/
|
|
119
|
+
readonly metadata: pulumi.Output<outputs.alerting.AlertRuleV0Alpha1Metadata | undefined>;
|
|
120
|
+
/**
|
|
121
|
+
* Options for applying the resource.
|
|
122
|
+
*/
|
|
123
|
+
readonly options: pulumi.Output<outputs.alerting.AlertRuleV0Alpha1Options | undefined>;
|
|
124
|
+
/**
|
|
125
|
+
* The spec of the resource.
|
|
126
|
+
*/
|
|
127
|
+
readonly spec: pulumi.Output<outputs.alerting.AlertRuleV0Alpha1Spec | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
* Create a AlertRuleV0Alpha1 resource with the given unique name, arguments, and options.
|
|
130
|
+
*
|
|
131
|
+
* @param name The _unique_ name of the resource.
|
|
132
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
133
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
134
|
+
*/
|
|
135
|
+
constructor(name: string, args?: AlertRuleV0Alpha1Args, opts?: pulumi.CustomResourceOptions);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Input properties used for looking up and filtering AlertRuleV0Alpha1 resources.
|
|
139
|
+
*/
|
|
140
|
+
export interface AlertRuleV0Alpha1State {
|
|
141
|
+
/**
|
|
142
|
+
* The metadata of the resource.
|
|
143
|
+
*/
|
|
144
|
+
metadata?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Metadata>;
|
|
145
|
+
/**
|
|
146
|
+
* Options for applying the resource.
|
|
147
|
+
*/
|
|
148
|
+
options?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Options>;
|
|
149
|
+
/**
|
|
150
|
+
* The spec of the resource.
|
|
151
|
+
*/
|
|
152
|
+
spec?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Spec>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The set of arguments for constructing a AlertRuleV0Alpha1 resource.
|
|
156
|
+
*/
|
|
157
|
+
export interface AlertRuleV0Alpha1Args {
|
|
158
|
+
/**
|
|
159
|
+
* The metadata of the resource.
|
|
160
|
+
*/
|
|
161
|
+
metadata?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Metadata>;
|
|
162
|
+
/**
|
|
163
|
+
* Options for applying the resource.
|
|
164
|
+
*/
|
|
165
|
+
options?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Options>;
|
|
166
|
+
/**
|
|
167
|
+
* The spec of the resource.
|
|
168
|
+
*/
|
|
169
|
+
spec?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1Spec>;
|
|
170
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AlertRuleV0Alpha1 = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("../utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages Grafana Alert Rules.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
16
|
+
*
|
|
17
|
+
* const alertruleFolder = new grafana.oss.Folder("alertrule_folder", {title: "Alert Rule Folder"});
|
|
18
|
+
* const example = new grafana.alerting.AlertRuleV0Alpha1("example", {
|
|
19
|
+
* metadata: {
|
|
20
|
+
* uid: "example-alert-rule",
|
|
21
|
+
* folderUid: alertruleFolder.uid,
|
|
22
|
+
* },
|
|
23
|
+
* spec: {
|
|
24
|
+
* title: "Example Alert Rule",
|
|
25
|
+
* trigger: {
|
|
26
|
+
* interval: "1m",
|
|
27
|
+
* },
|
|
28
|
+
* paused: true,
|
|
29
|
+
* expressions: {
|
|
30
|
+
* A: {
|
|
31
|
+
* model: {
|
|
32
|
+
* datasource: {
|
|
33
|
+
* type: "prometheus",
|
|
34
|
+
* uid: "ds_uid",
|
|
35
|
+
* },
|
|
36
|
+
* editorMode: "code",
|
|
37
|
+
* expr: "count(up{})",
|
|
38
|
+
* instant: true,
|
|
39
|
+
* intervalMs: 1000,
|
|
40
|
+
* legendFormat: "__auto",
|
|
41
|
+
* maxDataPoints: 43200,
|
|
42
|
+
* range: false,
|
|
43
|
+
* refId: "A",
|
|
44
|
+
* },
|
|
45
|
+
* datasourceUid: "ds_uid",
|
|
46
|
+
* relativeTimeRange: {
|
|
47
|
+
* from: "600s",
|
|
48
|
+
* to: "0s",
|
|
49
|
+
* },
|
|
50
|
+
* queryType: "",
|
|
51
|
+
* source: true,
|
|
52
|
+
* },
|
|
53
|
+
* B: {
|
|
54
|
+
* model: {
|
|
55
|
+
* conditions: [{
|
|
56
|
+
* evaluator: {
|
|
57
|
+
* params: [1],
|
|
58
|
+
* type: "gt",
|
|
59
|
+
* },
|
|
60
|
+
* operator: {
|
|
61
|
+
* type: "and",
|
|
62
|
+
* },
|
|
63
|
+
* query: {
|
|
64
|
+
* params: ["C"],
|
|
65
|
+
* },
|
|
66
|
+
* reducer: {
|
|
67
|
+
* params: [],
|
|
68
|
+
* type: "last",
|
|
69
|
+
* },
|
|
70
|
+
* type: "query",
|
|
71
|
+
* }],
|
|
72
|
+
* datasource: {
|
|
73
|
+
* type: "__expr__",
|
|
74
|
+
* uid: "__expr__",
|
|
75
|
+
* },
|
|
76
|
+
* expression: "A",
|
|
77
|
+
* intervalMs: 1000,
|
|
78
|
+
* maxDataPoints: 43200,
|
|
79
|
+
* refId: "C",
|
|
80
|
+
* type: "threshold",
|
|
81
|
+
* },
|
|
82
|
+
* datasourceUid: "__expr__",
|
|
83
|
+
* queryType: "",
|
|
84
|
+
* source: false,
|
|
85
|
+
* },
|
|
86
|
+
* },
|
|
87
|
+
* "for": "5m",
|
|
88
|
+
* labels: {
|
|
89
|
+
* severity: "critical",
|
|
90
|
+
* },
|
|
91
|
+
* annotations: {
|
|
92
|
+
* runbook_url: "https://example.com",
|
|
93
|
+
* },
|
|
94
|
+
* noDataState: "KeepLast",
|
|
95
|
+
* execErrState: "KeepLast",
|
|
96
|
+
* missingSeriesEvalsToResolve: 5,
|
|
97
|
+
* notificationSettings: {
|
|
98
|
+
* contactPoint: "grafana-default-email",
|
|
99
|
+
* },
|
|
100
|
+
* },
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
class AlertRuleV0Alpha1 extends pulumi.CustomResource {
|
|
105
|
+
/**
|
|
106
|
+
* Get an existing AlertRuleV0Alpha1 resource's state with the given name, ID, and optional extra
|
|
107
|
+
* properties used to qualify the lookup.
|
|
108
|
+
*
|
|
109
|
+
* @param name The _unique_ name of the resulting resource.
|
|
110
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
111
|
+
* @param state Any extra arguments used during the lookup.
|
|
112
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
113
|
+
*/
|
|
114
|
+
static get(name, id, state, opts) {
|
|
115
|
+
return new AlertRuleV0Alpha1(name, state, { ...opts, id: id });
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Returns true if the given object is an instance of AlertRuleV0Alpha1. This is designed to work even
|
|
119
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
120
|
+
*/
|
|
121
|
+
static isInstance(obj) {
|
|
122
|
+
if (obj === undefined || obj === null) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return obj['__pulumiType'] === AlertRuleV0Alpha1.__pulumiType;
|
|
126
|
+
}
|
|
127
|
+
constructor(name, argsOrState, opts) {
|
|
128
|
+
let resourceInputs = {};
|
|
129
|
+
opts = opts || {};
|
|
130
|
+
if (opts.id) {
|
|
131
|
+
const state = argsOrState;
|
|
132
|
+
resourceInputs["metadata"] = state?.metadata;
|
|
133
|
+
resourceInputs["options"] = state?.options;
|
|
134
|
+
resourceInputs["spec"] = state?.spec;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
const args = argsOrState;
|
|
138
|
+
resourceInputs["metadata"] = args?.metadata;
|
|
139
|
+
resourceInputs["options"] = args?.options;
|
|
140
|
+
resourceInputs["spec"] = args?.spec;
|
|
141
|
+
}
|
|
142
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
143
|
+
super(AlertRuleV0Alpha1.__pulumiType, name, resourceInputs, opts);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.AlertRuleV0Alpha1 = AlertRuleV0Alpha1;
|
|
147
|
+
/** @internal */
|
|
148
|
+
AlertRuleV0Alpha1.__pulumiType = 'grafana:alerting/alertRuleV0Alpha1:AlertRuleV0Alpha1';
|
|
149
|
+
//# sourceMappingURL=alertRuleV0Alpha1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alertRuleV0Alpha1.js","sourceRoot":"","sources":["../../alerting/alertRuleV0Alpha1.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,MAAa,iBAAkB,SAAQ,MAAM,CAAC,cAAc;IACxD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA8B,EAAE,IAAmC;QAC5H,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxE,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,iBAAiB,CAAC,YAAY,CAAC;IAClE,CAAC;IAuBD,YAAY,IAAY,EAAE,WAA4D,EAAE,IAAmC;QACvH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAiD,CAAC;YAChE,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC;YAC7C,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC;YAC3C,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC;SACxC;aAAM;YACH,MAAM,IAAI,GAAG,WAAgD,CAAC;YAC9D,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;SACvC;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;;AAjEL,8CAkEC;AApDG,gBAAgB;AACO,8BAAY,GAAG,sDAAsD,CAAC"}
|
package/alerting/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { AlertEnrichmentArgs, AlertEnrichmentState } from "./alertEnrichment";
|
|
2
2
|
export type AlertEnrichment = import("./alertEnrichment").AlertEnrichment;
|
|
3
3
|
export declare const AlertEnrichment: typeof import("./alertEnrichment").AlertEnrichment;
|
|
4
|
+
export { AlertRuleV0Alpha1Args, AlertRuleV0Alpha1State } from "./alertRuleV0Alpha1";
|
|
5
|
+
export type AlertRuleV0Alpha1 = import("./alertRuleV0Alpha1").AlertRuleV0Alpha1;
|
|
6
|
+
export declare const AlertRuleV0Alpha1: typeof import("./alertRuleV0Alpha1").AlertRuleV0Alpha1;
|
|
4
7
|
export { ContactPointArgs, ContactPointState } from "./contactPoint";
|
|
5
8
|
export type ContactPoint = import("./contactPoint").ContactPoint;
|
|
6
9
|
export declare const ContactPoint: typeof import("./contactPoint").ContactPoint;
|
|
@@ -13,6 +16,9 @@ export declare const MuteTiming: typeof import("./muteTiming").MuteTiming;
|
|
|
13
16
|
export { NotificationPolicyArgs, NotificationPolicyState } from "./notificationPolicy";
|
|
14
17
|
export type NotificationPolicy = import("./notificationPolicy").NotificationPolicy;
|
|
15
18
|
export declare const NotificationPolicy: typeof import("./notificationPolicy").NotificationPolicy;
|
|
19
|
+
export { RecordingRuleV0Alpha1Args, RecordingRuleV0Alpha1State } from "./recordingRuleV0Alpha1";
|
|
20
|
+
export type RecordingRuleV0Alpha1 = import("./recordingRuleV0Alpha1").RecordingRuleV0Alpha1;
|
|
21
|
+
export declare const RecordingRuleV0Alpha1: typeof import("./recordingRuleV0Alpha1").RecordingRuleV0Alpha1;
|
|
16
22
|
export { RuleGroupArgs, RuleGroupState } from "./ruleGroup";
|
|
17
23
|
export type RuleGroup = import("./ruleGroup").RuleGroup;
|
|
18
24
|
export declare const RuleGroup: typeof import("./ruleGroup").RuleGroup;
|
package/alerting/index.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.RuleGroup = exports.NotificationPolicy = exports.MuteTiming = exports.MessageTemplate = exports.ContactPoint = exports.AlertEnrichment = void 0;
|
|
5
|
+
exports.RuleGroup = exports.RecordingRuleV0Alpha1 = exports.NotificationPolicy = exports.MuteTiming = exports.MessageTemplate = exports.ContactPoint = exports.AlertRuleV0Alpha1 = exports.AlertEnrichment = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("../utilities");
|
|
8
8
|
exports.AlertEnrichment = null;
|
|
9
9
|
utilities.lazyLoad(exports, ["AlertEnrichment"], () => require("./alertEnrichment"));
|
|
10
|
+
exports.AlertRuleV0Alpha1 = null;
|
|
11
|
+
utilities.lazyLoad(exports, ["AlertRuleV0Alpha1"], () => require("./alertRuleV0Alpha1"));
|
|
10
12
|
exports.ContactPoint = null;
|
|
11
13
|
utilities.lazyLoad(exports, ["ContactPoint"], () => require("./contactPoint"));
|
|
12
14
|
exports.MessageTemplate = null;
|
|
@@ -15,6 +17,8 @@ exports.MuteTiming = null;
|
|
|
15
17
|
utilities.lazyLoad(exports, ["MuteTiming"], () => require("./muteTiming"));
|
|
16
18
|
exports.NotificationPolicy = null;
|
|
17
19
|
utilities.lazyLoad(exports, ["NotificationPolicy"], () => require("./notificationPolicy"));
|
|
20
|
+
exports.RecordingRuleV0Alpha1 = null;
|
|
21
|
+
utilities.lazyLoad(exports, ["RecordingRuleV0Alpha1"], () => require("./recordingRuleV0Alpha1"));
|
|
18
22
|
exports.RuleGroup = null;
|
|
19
23
|
utilities.lazyLoad(exports, ["RuleGroup"], () => require("./ruleGroup"));
|
|
20
24
|
const _module = {
|
|
@@ -23,6 +27,8 @@ const _module = {
|
|
|
23
27
|
switch (type) {
|
|
24
28
|
case "grafana:alerting/alertEnrichment:AlertEnrichment":
|
|
25
29
|
return new exports.AlertEnrichment(name, undefined, { urn });
|
|
30
|
+
case "grafana:alerting/alertRuleV0Alpha1:AlertRuleV0Alpha1":
|
|
31
|
+
return new exports.AlertRuleV0Alpha1(name, undefined, { urn });
|
|
26
32
|
case "grafana:alerting/contactPoint:ContactPoint":
|
|
27
33
|
return new exports.ContactPoint(name, undefined, { urn });
|
|
28
34
|
case "grafana:alerting/messageTemplate:MessageTemplate":
|
|
@@ -31,6 +37,8 @@ const _module = {
|
|
|
31
37
|
return new exports.MuteTiming(name, undefined, { urn });
|
|
32
38
|
case "grafana:alerting/notificationPolicy:NotificationPolicy":
|
|
33
39
|
return new exports.NotificationPolicy(name, undefined, { urn });
|
|
40
|
+
case "grafana:alerting/recordingRuleV0Alpha1:RecordingRuleV0Alpha1":
|
|
41
|
+
return new exports.RecordingRuleV0Alpha1(name, undefined, { urn });
|
|
34
42
|
case "grafana:alerting/ruleGroup:RuleGroup":
|
|
35
43
|
return new exports.RuleGroup(name, undefined, { urn });
|
|
36
44
|
default:
|
|
@@ -39,9 +47,11 @@ const _module = {
|
|
|
39
47
|
},
|
|
40
48
|
};
|
|
41
49
|
pulumi.runtime.registerResourceModule("grafana", "alerting/alertEnrichment", _module);
|
|
50
|
+
pulumi.runtime.registerResourceModule("grafana", "alerting/alertRuleV0Alpha1", _module);
|
|
42
51
|
pulumi.runtime.registerResourceModule("grafana", "alerting/contactPoint", _module);
|
|
43
52
|
pulumi.runtime.registerResourceModule("grafana", "alerting/messageTemplate", _module);
|
|
44
53
|
pulumi.runtime.registerResourceModule("grafana", "alerting/muteTiming", _module);
|
|
45
54
|
pulumi.runtime.registerResourceModule("grafana", "alerting/notificationPolicy", _module);
|
|
55
|
+
pulumi.runtime.registerResourceModule("grafana", "alerting/recordingRuleV0Alpha1", _module);
|
|
46
56
|
pulumi.runtime.registerResourceModule("grafana", "alerting/ruleGroup", _module);
|
|
47
57
|
//# sourceMappingURL=index.js.map
|
package/alerting/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../alerting/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAK7B,QAAA,eAAe,GAAuD,IAAW,CAAC;AAC/F,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAIxE,QAAA,YAAY,GAAiD,IAAW,CAAC;AACtF,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAIlE,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A;AAClF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,0BAA0B,EAAE,OAAO,CAAC,CAAA;AACrF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;AAChF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,6BAA6B,EAAE,OAAO,CAAC,CAAA;AACxF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,gCAAgC,EAAE,OAAO,CAAC,CAAA;AAC3F,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages Grafana Recording Rules.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
12
|
+
*
|
|
13
|
+
* const recordingruleFolder = new grafana.oss.Folder("recordingrule_folder", {title: "Alert Rule Folder"});
|
|
14
|
+
* const example = new grafana.alerting.RecordingRuleV0Alpha1("example", {
|
|
15
|
+
* metadata: {
|
|
16
|
+
* uid: "example-recording-rule",
|
|
17
|
+
* folderUid: recordingruleFolder.uid,
|
|
18
|
+
* },
|
|
19
|
+
* spec: {
|
|
20
|
+
* title: "Example Recording Rule",
|
|
21
|
+
* trigger: {
|
|
22
|
+
* interval: "1m",
|
|
23
|
+
* },
|
|
24
|
+
* paused: true,
|
|
25
|
+
* expressions: {
|
|
26
|
+
* A: {
|
|
27
|
+
* model: {
|
|
28
|
+
* editorMode: "code",
|
|
29
|
+
* expr: "count(up{})",
|
|
30
|
+
* instant: true,
|
|
31
|
+
* intervalMs: 1000,
|
|
32
|
+
* legendFormat: "__auto",
|
|
33
|
+
* maxDataPoints: 43200,
|
|
34
|
+
* range: false,
|
|
35
|
+
* refId: "A",
|
|
36
|
+
* },
|
|
37
|
+
* datasourceUid: "ds_uid",
|
|
38
|
+
* relativeTimeRange: {
|
|
39
|
+
* from: "600s",
|
|
40
|
+
* to: "0s",
|
|
41
|
+
* },
|
|
42
|
+
* queryType: "",
|
|
43
|
+
* source: true,
|
|
44
|
+
* },
|
|
45
|
+
* },
|
|
46
|
+
* targetDatasourceUid: "target_ds_uid",
|
|
47
|
+
* metric: "tf-metric",
|
|
48
|
+
* labels: {
|
|
49
|
+
* foo: "bar",
|
|
50
|
+
* },
|
|
51
|
+
* },
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare class RecordingRuleV0Alpha1 extends pulumi.CustomResource {
|
|
56
|
+
/**
|
|
57
|
+
* Get an existing RecordingRuleV0Alpha1 resource's state with the given name, ID, and optional extra
|
|
58
|
+
* properties used to qualify the lookup.
|
|
59
|
+
*
|
|
60
|
+
* @param name The _unique_ name of the resulting resource.
|
|
61
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
62
|
+
* @param state Any extra arguments used during the lookup.
|
|
63
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
64
|
+
*/
|
|
65
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RecordingRuleV0Alpha1State, opts?: pulumi.CustomResourceOptions): RecordingRuleV0Alpha1;
|
|
66
|
+
/**
|
|
67
|
+
* Returns true if the given object is an instance of RecordingRuleV0Alpha1. This is designed to work even
|
|
68
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
69
|
+
*/
|
|
70
|
+
static isInstance(obj: any): obj is RecordingRuleV0Alpha1;
|
|
71
|
+
/**
|
|
72
|
+
* The metadata of the resource.
|
|
73
|
+
*/
|
|
74
|
+
readonly metadata: pulumi.Output<outputs.alerting.RecordingRuleV0Alpha1Metadata | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Options for applying the resource.
|
|
77
|
+
*/
|
|
78
|
+
readonly options: pulumi.Output<outputs.alerting.RecordingRuleV0Alpha1Options | undefined>;
|
|
79
|
+
/**
|
|
80
|
+
* The spec of the resource.
|
|
81
|
+
*/
|
|
82
|
+
readonly spec: pulumi.Output<outputs.alerting.RecordingRuleV0Alpha1Spec | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Create a RecordingRuleV0Alpha1 resource with the given unique name, arguments, and options.
|
|
85
|
+
*
|
|
86
|
+
* @param name The _unique_ name of the resource.
|
|
87
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
88
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
89
|
+
*/
|
|
90
|
+
constructor(name: string, args?: RecordingRuleV0Alpha1Args, opts?: pulumi.CustomResourceOptions);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Input properties used for looking up and filtering RecordingRuleV0Alpha1 resources.
|
|
94
|
+
*/
|
|
95
|
+
export interface RecordingRuleV0Alpha1State {
|
|
96
|
+
/**
|
|
97
|
+
* The metadata of the resource.
|
|
98
|
+
*/
|
|
99
|
+
metadata?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Metadata>;
|
|
100
|
+
/**
|
|
101
|
+
* Options for applying the resource.
|
|
102
|
+
*/
|
|
103
|
+
options?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Options>;
|
|
104
|
+
/**
|
|
105
|
+
* The spec of the resource.
|
|
106
|
+
*/
|
|
107
|
+
spec?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Spec>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The set of arguments for constructing a RecordingRuleV0Alpha1 resource.
|
|
111
|
+
*/
|
|
112
|
+
export interface RecordingRuleV0Alpha1Args {
|
|
113
|
+
/**
|
|
114
|
+
* The metadata of the resource.
|
|
115
|
+
*/
|
|
116
|
+
metadata?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Metadata>;
|
|
117
|
+
/**
|
|
118
|
+
* Options for applying the resource.
|
|
119
|
+
*/
|
|
120
|
+
options?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Options>;
|
|
121
|
+
/**
|
|
122
|
+
* The spec of the resource.
|
|
123
|
+
*/
|
|
124
|
+
spec?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1Spec>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.RecordingRuleV0Alpha1 = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("../utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages Grafana Recording Rules.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
16
|
+
*
|
|
17
|
+
* const recordingruleFolder = new grafana.oss.Folder("recordingrule_folder", {title: "Alert Rule Folder"});
|
|
18
|
+
* const example = new grafana.alerting.RecordingRuleV0Alpha1("example", {
|
|
19
|
+
* metadata: {
|
|
20
|
+
* uid: "example-recording-rule",
|
|
21
|
+
* folderUid: recordingruleFolder.uid,
|
|
22
|
+
* },
|
|
23
|
+
* spec: {
|
|
24
|
+
* title: "Example Recording Rule",
|
|
25
|
+
* trigger: {
|
|
26
|
+
* interval: "1m",
|
|
27
|
+
* },
|
|
28
|
+
* paused: true,
|
|
29
|
+
* expressions: {
|
|
30
|
+
* A: {
|
|
31
|
+
* model: {
|
|
32
|
+
* editorMode: "code",
|
|
33
|
+
* expr: "count(up{})",
|
|
34
|
+
* instant: true,
|
|
35
|
+
* intervalMs: 1000,
|
|
36
|
+
* legendFormat: "__auto",
|
|
37
|
+
* maxDataPoints: 43200,
|
|
38
|
+
* range: false,
|
|
39
|
+
* refId: "A",
|
|
40
|
+
* },
|
|
41
|
+
* datasourceUid: "ds_uid",
|
|
42
|
+
* relativeTimeRange: {
|
|
43
|
+
* from: "600s",
|
|
44
|
+
* to: "0s",
|
|
45
|
+
* },
|
|
46
|
+
* queryType: "",
|
|
47
|
+
* source: true,
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* targetDatasourceUid: "target_ds_uid",
|
|
51
|
+
* metric: "tf-metric",
|
|
52
|
+
* labels: {
|
|
53
|
+
* foo: "bar",
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
class RecordingRuleV0Alpha1 extends pulumi.CustomResource {
|
|
60
|
+
/**
|
|
61
|
+
* Get an existing RecordingRuleV0Alpha1 resource's state with the given name, ID, and optional extra
|
|
62
|
+
* properties used to qualify the lookup.
|
|
63
|
+
*
|
|
64
|
+
* @param name The _unique_ name of the resulting resource.
|
|
65
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
66
|
+
* @param state Any extra arguments used during the lookup.
|
|
67
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
68
|
+
*/
|
|
69
|
+
static get(name, id, state, opts) {
|
|
70
|
+
return new RecordingRuleV0Alpha1(name, state, { ...opts, id: id });
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns true if the given object is an instance of RecordingRuleV0Alpha1. This is designed to work even
|
|
74
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
75
|
+
*/
|
|
76
|
+
static isInstance(obj) {
|
|
77
|
+
if (obj === undefined || obj === null) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return obj['__pulumiType'] === RecordingRuleV0Alpha1.__pulumiType;
|
|
81
|
+
}
|
|
82
|
+
constructor(name, argsOrState, opts) {
|
|
83
|
+
let resourceInputs = {};
|
|
84
|
+
opts = opts || {};
|
|
85
|
+
if (opts.id) {
|
|
86
|
+
const state = argsOrState;
|
|
87
|
+
resourceInputs["metadata"] = state?.metadata;
|
|
88
|
+
resourceInputs["options"] = state?.options;
|
|
89
|
+
resourceInputs["spec"] = state?.spec;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const args = argsOrState;
|
|
93
|
+
resourceInputs["metadata"] = args?.metadata;
|
|
94
|
+
resourceInputs["options"] = args?.options;
|
|
95
|
+
resourceInputs["spec"] = args?.spec;
|
|
96
|
+
}
|
|
97
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
98
|
+
super(RecordingRuleV0Alpha1.__pulumiType, name, resourceInputs, opts);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.RecordingRuleV0Alpha1 = RecordingRuleV0Alpha1;
|
|
102
|
+
/** @internal */
|
|
103
|
+
RecordingRuleV0Alpha1.__pulumiType = 'grafana:alerting/recordingRuleV0Alpha1:RecordingRuleV0Alpha1';
|
|
104
|
+
//# sourceMappingURL=recordingRuleV0Alpha1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingRuleV0Alpha1.js","sourceRoot":"","sources":["../../alerting/recordingRuleV0Alpha1.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;IAC5D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkC,EAAE,IAAmC;QAChI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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../fleetmanagement/collector.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C
|
|
1
|
+
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../fleetmanagement/collector.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,SAAU,SAAQ,MAAM,CAAC,cAAc;IAChD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAsB,EAAE,IAAmC;QACpH,OAAO,IAAI,SAAS,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAChE,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,SAAS,CAAC,YAAY,CAAC;IAC1D,CAAC;IAmBD,YAAY,IAAY,EAAE,WAA4C,EAAE,IAAmC;QACvG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAyC,CAAC;YACxD,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC;YAC3C,cAAc,CAAC,kBAAkB,CAAC,GAAG,KAAK,EAAE,gBAAgB,CAAC;SAChE;aAAM;YACH,MAAM,IAAI,GAAG,WAAwC,CAAC;YACtD,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,EAAE,gBAAgB,CAAC;SAC/D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;;AA3DL,8BA4DC;AA9CG,gBAAgB;AACO,sBAAY,GAAG,6CAA6C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumiverse/grafana",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0-alpha.1762961903",
|
|
4
4
|
"description": "A Pulumi package for creating and managing grafana.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pulumi",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"pulumi": {
|
|
25
25
|
"resource": true,
|
|
26
26
|
"name": "grafana",
|
|
27
|
-
"version": "2.
|
|
27
|
+
"version": "2.15.0-alpha.1762961903",
|
|
28
28
|
"server": "github://api.github.com/pulumiverse"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/types/input.d.ts
CHANGED
|
@@ -500,6 +500,134 @@ export declare namespace alerting {
|
|
|
500
500
|
*/
|
|
501
501
|
timeout?: pulumi.Input<string>;
|
|
502
502
|
}
|
|
503
|
+
interface AlertRuleV0Alpha1Metadata {
|
|
504
|
+
/**
|
|
505
|
+
* Annotations of the resource.
|
|
506
|
+
*/
|
|
507
|
+
annotations?: pulumi.Input<{
|
|
508
|
+
[key: string]: pulumi.Input<string>;
|
|
509
|
+
}>;
|
|
510
|
+
/**
|
|
511
|
+
* The UID of the folder to save the resource in.
|
|
512
|
+
*/
|
|
513
|
+
folderUid?: pulumi.Input<string>;
|
|
514
|
+
/**
|
|
515
|
+
* The unique identifier of the resource.
|
|
516
|
+
*/
|
|
517
|
+
uid: pulumi.Input<string>;
|
|
518
|
+
/**
|
|
519
|
+
* The full URL of the resource.
|
|
520
|
+
*/
|
|
521
|
+
url?: pulumi.Input<string>;
|
|
522
|
+
/**
|
|
523
|
+
* The globally unique identifier of a resource, used by the API for tracking.
|
|
524
|
+
*/
|
|
525
|
+
uuid?: pulumi.Input<string>;
|
|
526
|
+
/**
|
|
527
|
+
* The version of the resource.
|
|
528
|
+
*/
|
|
529
|
+
version?: pulumi.Input<string>;
|
|
530
|
+
}
|
|
531
|
+
interface AlertRuleV0Alpha1Options {
|
|
532
|
+
/**
|
|
533
|
+
* Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
|
|
534
|
+
*/
|
|
535
|
+
overwrite?: pulumi.Input<boolean>;
|
|
536
|
+
}
|
|
537
|
+
interface AlertRuleV0Alpha1Spec {
|
|
538
|
+
/**
|
|
539
|
+
* Key-value pairs of metadata to attach to the alert rule. They add additional information, such as a `summary` or `runbookUrl`, to help identify and investigate alerts.
|
|
540
|
+
*/
|
|
541
|
+
annotations?: pulumi.Input<{
|
|
542
|
+
[key: string]: pulumi.Input<string>;
|
|
543
|
+
}>;
|
|
544
|
+
/**
|
|
545
|
+
* Describes what state to enter when the rule's query is invalid and the rule cannot be executed. Options are OK, Error, KeepLast, and Alerting.
|
|
546
|
+
*/
|
|
547
|
+
execErrState: pulumi.Input<string>;
|
|
548
|
+
/**
|
|
549
|
+
* A sequence of stages that describe the contents of the rule.
|
|
550
|
+
*/
|
|
551
|
+
expressions: any;
|
|
552
|
+
/**
|
|
553
|
+
* The amount of time for which the rule must be breached for the rule to be considered to be Firing. Before this time has elapsed, the rule is only considered to be Pending.
|
|
554
|
+
*/
|
|
555
|
+
for?: pulumi.Input<string>;
|
|
556
|
+
/**
|
|
557
|
+
* The amount of time for which the rule will considered to be Recovering after initially Firing. Before this time has elapsed, the rule will continue to fire once it's been triggered.
|
|
558
|
+
*/
|
|
559
|
+
keepFiringFor?: pulumi.Input<string>;
|
|
560
|
+
/**
|
|
561
|
+
* Key-value pairs to attach to the alert rule that can be used in matching, grouping, and routing.
|
|
562
|
+
*/
|
|
563
|
+
labels?: pulumi.Input<{
|
|
564
|
+
[key: string]: pulumi.Input<string>;
|
|
565
|
+
}>;
|
|
566
|
+
/**
|
|
567
|
+
* The number of missing series evaluations that must occur before the rule is considered to be resolved.
|
|
568
|
+
*/
|
|
569
|
+
missingSeriesEvalsToResolve?: pulumi.Input<number>;
|
|
570
|
+
/**
|
|
571
|
+
* Describes what state to enter when the rule's query returns No Data. Options are OK, NoData, KeepLast, and Alerting.
|
|
572
|
+
*/
|
|
573
|
+
noDataState: pulumi.Input<string>;
|
|
574
|
+
/**
|
|
575
|
+
* Notification settings for the rule. If specified, it overrides the notification policies.
|
|
576
|
+
*/
|
|
577
|
+
notificationSettings?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1SpecNotificationSettings>;
|
|
578
|
+
/**
|
|
579
|
+
* Reference to a panel that this alert rule is associated with. Should be an object with 'dashboard*uid' (string) and 'panel*id' (number) fields.
|
|
580
|
+
*/
|
|
581
|
+
panelRef?: any;
|
|
582
|
+
/**
|
|
583
|
+
* Sets whether the rule should be paused or not.
|
|
584
|
+
*/
|
|
585
|
+
paused?: pulumi.Input<boolean>;
|
|
586
|
+
/**
|
|
587
|
+
* The title of the alert rule.
|
|
588
|
+
*/
|
|
589
|
+
title: pulumi.Input<string>;
|
|
590
|
+
/**
|
|
591
|
+
* The trigger configuration for the alert rule.
|
|
592
|
+
*/
|
|
593
|
+
trigger?: pulumi.Input<inputs.alerting.AlertRuleV0Alpha1SpecTrigger>;
|
|
594
|
+
}
|
|
595
|
+
interface AlertRuleV0Alpha1SpecNotificationSettings {
|
|
596
|
+
/**
|
|
597
|
+
* A list of time interval names to apply to alerts that match this policy to suppress them unless they are sent at the specified time.
|
|
598
|
+
*/
|
|
599
|
+
activeTimings?: pulumi.Input<pulumi.Input<string>[]>;
|
|
600
|
+
/**
|
|
601
|
+
* The contact point to route notifications that match this rule to.
|
|
602
|
+
*/
|
|
603
|
+
contactPoint: pulumi.Input<string>;
|
|
604
|
+
/**
|
|
605
|
+
* A list of alert labels to group alerts into notifications by.
|
|
606
|
+
*/
|
|
607
|
+
groupBies?: pulumi.Input<pulumi.Input<string>[]>;
|
|
608
|
+
/**
|
|
609
|
+
* Minimum time interval between two notifications for the same group.
|
|
610
|
+
*/
|
|
611
|
+
groupInterval?: pulumi.Input<string>;
|
|
612
|
+
/**
|
|
613
|
+
* Time to wait to buffer alerts of the same group before sending a notification.
|
|
614
|
+
*/
|
|
615
|
+
groupWait?: pulumi.Input<string>;
|
|
616
|
+
/**
|
|
617
|
+
* A list of mute timing names to apply to alerts that match this policy.
|
|
618
|
+
*/
|
|
619
|
+
muteTimings?: pulumi.Input<pulumi.Input<string>[]>;
|
|
620
|
+
/**
|
|
621
|
+
* Minimum time interval for re-sending a notification if an alert is still firing.
|
|
622
|
+
*/
|
|
623
|
+
repeatInterval?: pulumi.Input<string>;
|
|
624
|
+
}
|
|
625
|
+
interface AlertRuleV0Alpha1SpecTrigger {
|
|
626
|
+
/**
|
|
627
|
+
* The interval at which the alert rule should be evaluated.
|
|
628
|
+
*/
|
|
629
|
+
interval: pulumi.Input<string>;
|
|
630
|
+
}
|
|
503
631
|
interface ContactPointAlertmanager {
|
|
504
632
|
/**
|
|
505
633
|
* The password component of the basic auth credentials to use.
|
|
@@ -1796,6 +1924,78 @@ export declare namespace alerting {
|
|
|
1796
1924
|
*/
|
|
1797
1925
|
value: pulumi.Input<string>;
|
|
1798
1926
|
}
|
|
1927
|
+
interface RecordingRuleV0Alpha1Metadata {
|
|
1928
|
+
/**
|
|
1929
|
+
* Annotations of the resource.
|
|
1930
|
+
*/
|
|
1931
|
+
annotations?: pulumi.Input<{
|
|
1932
|
+
[key: string]: pulumi.Input<string>;
|
|
1933
|
+
}>;
|
|
1934
|
+
/**
|
|
1935
|
+
* The UID of the folder to save the resource in.
|
|
1936
|
+
*/
|
|
1937
|
+
folderUid?: pulumi.Input<string>;
|
|
1938
|
+
/**
|
|
1939
|
+
* The unique identifier of the resource.
|
|
1940
|
+
*/
|
|
1941
|
+
uid: pulumi.Input<string>;
|
|
1942
|
+
/**
|
|
1943
|
+
* The full URL of the resource.
|
|
1944
|
+
*/
|
|
1945
|
+
url?: pulumi.Input<string>;
|
|
1946
|
+
/**
|
|
1947
|
+
* The globally unique identifier of a resource, used by the API for tracking.
|
|
1948
|
+
*/
|
|
1949
|
+
uuid?: pulumi.Input<string>;
|
|
1950
|
+
/**
|
|
1951
|
+
* The version of the resource.
|
|
1952
|
+
*/
|
|
1953
|
+
version?: pulumi.Input<string>;
|
|
1954
|
+
}
|
|
1955
|
+
interface RecordingRuleV0Alpha1Options {
|
|
1956
|
+
/**
|
|
1957
|
+
* Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
|
|
1958
|
+
*/
|
|
1959
|
+
overwrite?: pulumi.Input<boolean>;
|
|
1960
|
+
}
|
|
1961
|
+
interface RecordingRuleV0Alpha1Spec {
|
|
1962
|
+
/**
|
|
1963
|
+
* A sequence of stages that describe the contents of the rule.
|
|
1964
|
+
*/
|
|
1965
|
+
expressions: any;
|
|
1966
|
+
/**
|
|
1967
|
+
* Key-value pairs to attach to the recorded metric.
|
|
1968
|
+
*/
|
|
1969
|
+
labels?: pulumi.Input<{
|
|
1970
|
+
[key: string]: pulumi.Input<string>;
|
|
1971
|
+
}>;
|
|
1972
|
+
/**
|
|
1973
|
+
* The name of the metric to write to.
|
|
1974
|
+
*/
|
|
1975
|
+
metric: pulumi.Input<string>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Sets whether the recording rule should be paused or not.
|
|
1978
|
+
*/
|
|
1979
|
+
paused?: pulumi.Input<boolean>;
|
|
1980
|
+
/**
|
|
1981
|
+
* The UID of the datasource to write the metric to.
|
|
1982
|
+
*/
|
|
1983
|
+
targetDatasourceUid: pulumi.Input<string>;
|
|
1984
|
+
/**
|
|
1985
|
+
* The title of the recording rule.
|
|
1986
|
+
*/
|
|
1987
|
+
title: pulumi.Input<string>;
|
|
1988
|
+
/**
|
|
1989
|
+
* The trigger configuration for the recording rule.
|
|
1990
|
+
*/
|
|
1991
|
+
trigger?: pulumi.Input<inputs.alerting.RecordingRuleV0Alpha1SpecTrigger>;
|
|
1992
|
+
}
|
|
1993
|
+
interface RecordingRuleV0Alpha1SpecTrigger {
|
|
1994
|
+
/**
|
|
1995
|
+
* The interval at which the recording rule should be evaluated.
|
|
1996
|
+
*/
|
|
1997
|
+
interval: pulumi.Input<string>;
|
|
1998
|
+
}
|
|
1799
1999
|
interface RuleGroupRule {
|
|
1800
2000
|
/**
|
|
1801
2001
|
* Key-value pairs of metadata to attach to the alert rule. They add additional information, such as a `summary` or `runbookUrl`, to help identify and investigate alerts. The `__dashboardUid__` and `__panelId__` annotations, which link alerts to a panel, must be set together. Defaults to `map[]`.
|
package/types/output.d.ts
CHANGED
|
@@ -499,6 +499,134 @@ export declare namespace alerting {
|
|
|
499
499
|
*/
|
|
500
500
|
timeout?: string;
|
|
501
501
|
}
|
|
502
|
+
interface AlertRuleV0Alpha1Metadata {
|
|
503
|
+
/**
|
|
504
|
+
* Annotations of the resource.
|
|
505
|
+
*/
|
|
506
|
+
annotations: {
|
|
507
|
+
[key: string]: string;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* The UID of the folder to save the resource in.
|
|
511
|
+
*/
|
|
512
|
+
folderUid?: string;
|
|
513
|
+
/**
|
|
514
|
+
* The unique identifier of the resource.
|
|
515
|
+
*/
|
|
516
|
+
uid: string;
|
|
517
|
+
/**
|
|
518
|
+
* The full URL of the resource.
|
|
519
|
+
*/
|
|
520
|
+
url: string;
|
|
521
|
+
/**
|
|
522
|
+
* The globally unique identifier of a resource, used by the API for tracking.
|
|
523
|
+
*/
|
|
524
|
+
uuid: string;
|
|
525
|
+
/**
|
|
526
|
+
* The version of the resource.
|
|
527
|
+
*/
|
|
528
|
+
version: string;
|
|
529
|
+
}
|
|
530
|
+
interface AlertRuleV0Alpha1Options {
|
|
531
|
+
/**
|
|
532
|
+
* Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
|
|
533
|
+
*/
|
|
534
|
+
overwrite?: boolean;
|
|
535
|
+
}
|
|
536
|
+
interface AlertRuleV0Alpha1Spec {
|
|
537
|
+
/**
|
|
538
|
+
* Key-value pairs of metadata to attach to the alert rule. They add additional information, such as a `summary` or `runbookUrl`, to help identify and investigate alerts.
|
|
539
|
+
*/
|
|
540
|
+
annotations?: {
|
|
541
|
+
[key: string]: string;
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* Describes what state to enter when the rule's query is invalid and the rule cannot be executed. Options are OK, Error, KeepLast, and Alerting.
|
|
545
|
+
*/
|
|
546
|
+
execErrState: string;
|
|
547
|
+
/**
|
|
548
|
+
* A sequence of stages that describe the contents of the rule.
|
|
549
|
+
*/
|
|
550
|
+
expressions: any;
|
|
551
|
+
/**
|
|
552
|
+
* The amount of time for which the rule must be breached for the rule to be considered to be Firing. Before this time has elapsed, the rule is only considered to be Pending.
|
|
553
|
+
*/
|
|
554
|
+
for?: string;
|
|
555
|
+
/**
|
|
556
|
+
* The amount of time for which the rule will considered to be Recovering after initially Firing. Before this time has elapsed, the rule will continue to fire once it's been triggered.
|
|
557
|
+
*/
|
|
558
|
+
keepFiringFor?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Key-value pairs to attach to the alert rule that can be used in matching, grouping, and routing.
|
|
561
|
+
*/
|
|
562
|
+
labels?: {
|
|
563
|
+
[key: string]: string;
|
|
564
|
+
};
|
|
565
|
+
/**
|
|
566
|
+
* The number of missing series evaluations that must occur before the rule is considered to be resolved.
|
|
567
|
+
*/
|
|
568
|
+
missingSeriesEvalsToResolve?: number;
|
|
569
|
+
/**
|
|
570
|
+
* Describes what state to enter when the rule's query returns No Data. Options are OK, NoData, KeepLast, and Alerting.
|
|
571
|
+
*/
|
|
572
|
+
noDataState: string;
|
|
573
|
+
/**
|
|
574
|
+
* Notification settings for the rule. If specified, it overrides the notification policies.
|
|
575
|
+
*/
|
|
576
|
+
notificationSettings?: outputs.alerting.AlertRuleV0Alpha1SpecNotificationSettings;
|
|
577
|
+
/**
|
|
578
|
+
* Reference to a panel that this alert rule is associated with. Should be an object with 'dashboard*uid' (string) and 'panel*id' (number) fields.
|
|
579
|
+
*/
|
|
580
|
+
panelRef?: any;
|
|
581
|
+
/**
|
|
582
|
+
* Sets whether the rule should be paused or not.
|
|
583
|
+
*/
|
|
584
|
+
paused?: boolean;
|
|
585
|
+
/**
|
|
586
|
+
* The title of the alert rule.
|
|
587
|
+
*/
|
|
588
|
+
title: string;
|
|
589
|
+
/**
|
|
590
|
+
* The trigger configuration for the alert rule.
|
|
591
|
+
*/
|
|
592
|
+
trigger?: outputs.alerting.AlertRuleV0Alpha1SpecTrigger;
|
|
593
|
+
}
|
|
594
|
+
interface AlertRuleV0Alpha1SpecNotificationSettings {
|
|
595
|
+
/**
|
|
596
|
+
* A list of time interval names to apply to alerts that match this policy to suppress them unless they are sent at the specified time.
|
|
597
|
+
*/
|
|
598
|
+
activeTimings?: string[];
|
|
599
|
+
/**
|
|
600
|
+
* The contact point to route notifications that match this rule to.
|
|
601
|
+
*/
|
|
602
|
+
contactPoint: string;
|
|
603
|
+
/**
|
|
604
|
+
* A list of alert labels to group alerts into notifications by.
|
|
605
|
+
*/
|
|
606
|
+
groupBies?: string[];
|
|
607
|
+
/**
|
|
608
|
+
* Minimum time interval between two notifications for the same group.
|
|
609
|
+
*/
|
|
610
|
+
groupInterval?: string;
|
|
611
|
+
/**
|
|
612
|
+
* Time to wait to buffer alerts of the same group before sending a notification.
|
|
613
|
+
*/
|
|
614
|
+
groupWait?: string;
|
|
615
|
+
/**
|
|
616
|
+
* A list of mute timing names to apply to alerts that match this policy.
|
|
617
|
+
*/
|
|
618
|
+
muteTimings?: string[];
|
|
619
|
+
/**
|
|
620
|
+
* Minimum time interval for re-sending a notification if an alert is still firing.
|
|
621
|
+
*/
|
|
622
|
+
repeatInterval?: string;
|
|
623
|
+
}
|
|
624
|
+
interface AlertRuleV0Alpha1SpecTrigger {
|
|
625
|
+
/**
|
|
626
|
+
* The interval at which the alert rule should be evaluated.
|
|
627
|
+
*/
|
|
628
|
+
interval: string;
|
|
629
|
+
}
|
|
502
630
|
interface ContactPointAlertmanager {
|
|
503
631
|
/**
|
|
504
632
|
* The password component of the basic auth credentials to use.
|
|
@@ -1795,6 +1923,78 @@ export declare namespace alerting {
|
|
|
1795
1923
|
*/
|
|
1796
1924
|
value: string;
|
|
1797
1925
|
}
|
|
1926
|
+
interface RecordingRuleV0Alpha1Metadata {
|
|
1927
|
+
/**
|
|
1928
|
+
* Annotations of the resource.
|
|
1929
|
+
*/
|
|
1930
|
+
annotations: {
|
|
1931
|
+
[key: string]: string;
|
|
1932
|
+
};
|
|
1933
|
+
/**
|
|
1934
|
+
* The UID of the folder to save the resource in.
|
|
1935
|
+
*/
|
|
1936
|
+
folderUid?: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* The unique identifier of the resource.
|
|
1939
|
+
*/
|
|
1940
|
+
uid: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* The full URL of the resource.
|
|
1943
|
+
*/
|
|
1944
|
+
url: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* The globally unique identifier of a resource, used by the API for tracking.
|
|
1947
|
+
*/
|
|
1948
|
+
uuid: string;
|
|
1949
|
+
/**
|
|
1950
|
+
* The version of the resource.
|
|
1951
|
+
*/
|
|
1952
|
+
version: string;
|
|
1953
|
+
}
|
|
1954
|
+
interface RecordingRuleV0Alpha1Options {
|
|
1955
|
+
/**
|
|
1956
|
+
* Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
|
|
1957
|
+
*/
|
|
1958
|
+
overwrite?: boolean;
|
|
1959
|
+
}
|
|
1960
|
+
interface RecordingRuleV0Alpha1Spec {
|
|
1961
|
+
/**
|
|
1962
|
+
* A sequence of stages that describe the contents of the rule.
|
|
1963
|
+
*/
|
|
1964
|
+
expressions: any;
|
|
1965
|
+
/**
|
|
1966
|
+
* Key-value pairs to attach to the recorded metric.
|
|
1967
|
+
*/
|
|
1968
|
+
labels?: {
|
|
1969
|
+
[key: string]: string;
|
|
1970
|
+
};
|
|
1971
|
+
/**
|
|
1972
|
+
* The name of the metric to write to.
|
|
1973
|
+
*/
|
|
1974
|
+
metric: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* Sets whether the recording rule should be paused or not.
|
|
1977
|
+
*/
|
|
1978
|
+
paused?: boolean;
|
|
1979
|
+
/**
|
|
1980
|
+
* The UID of the datasource to write the metric to.
|
|
1981
|
+
*/
|
|
1982
|
+
targetDatasourceUid: string;
|
|
1983
|
+
/**
|
|
1984
|
+
* The title of the recording rule.
|
|
1985
|
+
*/
|
|
1986
|
+
title: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* The trigger configuration for the recording rule.
|
|
1989
|
+
*/
|
|
1990
|
+
trigger?: outputs.alerting.RecordingRuleV0Alpha1SpecTrigger;
|
|
1991
|
+
}
|
|
1992
|
+
interface RecordingRuleV0Alpha1SpecTrigger {
|
|
1993
|
+
/**
|
|
1994
|
+
* The interval at which the recording rule should be evaluated.
|
|
1995
|
+
*/
|
|
1996
|
+
interval: string;
|
|
1997
|
+
}
|
|
1798
1998
|
interface RuleGroupRule {
|
|
1799
1999
|
/**
|
|
1800
2000
|
* Key-value pairs of metadata to attach to the alert rule. They add additional information, such as a `summary` or `runbookUrl`, to help identify and investigate alerts. The `__dashboardUid__` and `__panelId__` annotations, which link alerts to a panel, must be set together. Defaults to `map[]`.
|