@jooon/pulumi-signoz 0.1.0

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.
Files changed (51) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +114 -0
  3. package/alert.d.ts +307 -0
  4. package/alert.d.ts.map +1 -0
  5. package/alert.js +128 -0
  6. package/alert.js.map +1 -0
  7. package/config/index.d.ts +2 -0
  8. package/config/index.d.ts.map +1 -0
  9. package/config/index.js +21 -0
  10. package/config/index.js.map +1 -0
  11. package/config/vars.d.ts +22 -0
  12. package/config/vars.d.ts.map +1 -0
  13. package/config/vars.js +54 -0
  14. package/config/vars.js.map +1 -0
  15. package/dashboard.d.ts +186 -0
  16. package/dashboard.d.ts.map +1 -0
  17. package/dashboard.js +126 -0
  18. package/dashboard.js.map +1 -0
  19. package/getAlert.d.ts +47 -0
  20. package/getAlert.d.ts.map +1 -0
  21. package/getAlert.js +45 -0
  22. package/getAlert.js.map +1 -0
  23. package/getDashboard.d.ts +36 -0
  24. package/getDashboard.d.ts.map +1 -0
  25. package/getDashboard.js +47 -0
  26. package/getDashboard.js.map +1 -0
  27. package/index.d.ts +17 -0
  28. package/index.d.ts.map +1 -0
  29. package/index.js +75 -0
  30. package/index.js.map +1 -0
  31. package/package.json +30 -0
  32. package/provider.d.ts +74 -0
  33. package/provider.d.ts.map +1 -0
  34. package/provider.js +81 -0
  35. package/provider.js.map +1 -0
  36. package/types/index.d.ts +4 -0
  37. package/types/index.d.ts.map +1 -0
  38. package/types/index.js +34 -0
  39. package/types/index.js.map +1 -0
  40. package/types/input.d.ts +31 -0
  41. package/types/input.d.ts.map +1 -0
  42. package/types/input.js +5 -0
  43. package/types/input.js.map +1 -0
  44. package/types/output.d.ts +58 -0
  45. package/types/output.d.ts.map +1 -0
  46. package/types/output.js +5 -0
  47. package/types/output.js.map +1 -0
  48. package/utilities.d.ts +5 -0
  49. package/utilities.d.ts.map +1 -0
  50. package/utilities.js +114 -0
  51. package/utilities.js.map +1 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # Pulumi SigNoz Provider
2
+
3
+ A Pulumi provider for [SigNoz](https://signoz.io), bridged from the official
4
+ [SigNoz Terraform provider](https://github.com/SigNoz/terraform-provider-signoz)
5
+ via [pulumi-terraform-bridge](https://github.com/pulumi/pulumi-terraform-bridge).
6
+
7
+ Manage SigNoz dashboards and alerts as code — versioned in Git, reviewed in PRs,
8
+ deployed alongside your services.
9
+
10
+ > **Status: early.** Tracks upstream `SigNoz/terraform-provider-signoz` (pre-1.0)
11
+ > and follows its versioning. Schemas may change between minor releases.
12
+
13
+ ## Resources
14
+
15
+ | Pulumi token | Terraform resource | Purpose |
16
+ | ----------------------------- | -------------------------- | ------------------------------------ |
17
+ | `signoz:index:Alert` | `signoz_alert` | Manage alert rules |
18
+ | `signoz:index:Dashboard` | `signoz_dashboard` | Manage dashboards |
19
+ | `signoz:index:getAlert` | `signoz_alert` (data) | Look up an existing alert by ID |
20
+ | `signoz:index:getDashboard` | `signoz_dashboard` (data) | Look up an existing dashboard by ID |
21
+
22
+ ## Installing
23
+
24
+ ### Node.js (TypeScript / JavaScript)
25
+
26
+ ```bash
27
+ npm install @jooon/pulumi-signoz
28
+ # or
29
+ yarn add @jooon/pulumi-signoz
30
+ ```
31
+
32
+ ### Python
33
+
34
+ ```bash
35
+ pip install pulumi-signoz-jooon
36
+ ```
37
+
38
+ ### Go
39
+
40
+ ```bash
41
+ go get github.com/jgautheron/pulumi-signoz/sdk/go/signoz
42
+ ```
43
+
44
+ ### .NET
45
+
46
+ ```bash
47
+ dotnet add package Jooon.Pulumi.Signoz
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ The provider reads the same env vars as the upstream Terraform provider:
53
+
54
+ | Env var | Pulumi config key | Purpose |
55
+ | ------------------------ | --------------------- | ------------------------------------------------ |
56
+ | `SIGNOZ_ACCESS_TOKEN` | `signoz:accessToken` | API key (sensitive, **required**) |
57
+ | `SIGNOZ_ENDPOINT` | `signoz:endpoint` | SigNoz URL (default `http://localhost:3301`) |
58
+ | `SIGNOZ_HTTP_MAX_RETRY` | `signoz:httpMaxRetry` | Default `10` |
59
+ | `SIGNOZ_HTTP_TIMEOUT` | `signoz:httpTimeout` | Default `35` seconds |
60
+
61
+ Generate an access token in the SigNoz UI: **Settings → Service Accounts → Add →
62
+ Keys → Add Key**.
63
+
64
+ ## Quick start (TypeScript)
65
+
66
+ ```typescript
67
+ import * as signoz from "@jooon/pulumi-signoz";
68
+
69
+ const provider = new signoz.Provider("signoz", {
70
+ endpoint: "https://signoz.example.com",
71
+ accessToken: process.env.SIGNOZ_ACCESS_TOKEN!,
72
+ });
73
+
74
+ new signoz.Dashboard("app-overview", {
75
+ data: JSON.stringify({
76
+ title: "App Overview",
77
+ // ...full dashboard JSON; export from the SigNoz UI to bootstrap
78
+ }),
79
+ }, { provider });
80
+
81
+ new signoz.Alert("app-error-rate", {
82
+ alertType: "METRIC_BASED_ALERT",
83
+ // ...rule definition
84
+ }, { provider });
85
+ ```
86
+
87
+ See the [`examples/`](./examples/) directory for runnable samples.
88
+
89
+ ## Versioning
90
+
91
+ This provider mirrors upstream `SigNoz/terraform-provider-signoz` version
92
+ numbers (e.g. when upstream releases `v0.0.12`, this provider tags `v0.0.12`).
93
+ Patch-suffix `+N` is reserved for bridge-only fixes between upstream releases.
94
+ Both upstream and this wrapper are pre-1.0 — pin exact versions in consumers.
95
+
96
+ ## Contributing / building from source
97
+
98
+ ```bash
99
+ git clone https://github.com/jgautheron/pulumi-signoz
100
+ cd pulumi-signoz
101
+ make tfgen # generate schema.json from upstream provider
102
+ make provider # build pulumi-resource-signoz binary
103
+ make build_sdks # generate SDKs for all supported languages
104
+ ```
105
+
106
+ ## License
107
+
108
+ Apache-2.0. The upstream SigNoz Terraform provider is MPL-2.0.
109
+
110
+ ## Related
111
+
112
+ - [SigNoz Terraform Provider](https://github.com/SigNoz/terraform-provider-signoz) (upstream)
113
+ - [SigNoz Terraform docs](https://registry.terraform.io/providers/SigNoz/signoz/latest/docs)
114
+ - [Pulumi Terraform Bridge](https://github.com/pulumi/pulumi-terraform-bridge)
package/alert.d.ts ADDED
@@ -0,0 +1,307 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ export declare class Alert extends pulumi.CustomResource {
5
+ /**
6
+ * Get an existing Alert resource's state with the given name, ID, and optional extra
7
+ * properties used to qualify the lookup.
8
+ *
9
+ * @param name The _unique_ name of the resulting resource.
10
+ * @param id The _unique_ provider ID of the resource to lookup.
11
+ * @param state Any extra arguments used during the lookup.
12
+ * @param opts Optional settings to control the behavior of the CustomResource.
13
+ */
14
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertState, opts?: pulumi.CustomResourceOptions): Alert;
15
+ /**
16
+ * Returns true if the given object is an instance of Alert. This is designed to work even
17
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
18
+ */
19
+ static isInstance(obj: any): obj is Alert;
20
+ /**
21
+ * Name of the alert.
22
+ */
23
+ readonly alert: pulumi.Output<string>;
24
+ /**
25
+ * Type of the alert. Possible values are: METRIC_BASED_ALERT, LOGS_BASED_ALERT, TRACES_BASED_ALERT, and EXCEPTIONS_BASED_ALERT.
26
+ */
27
+ readonly alertType: pulumi.Output<string>;
28
+ /**
29
+ * Whether to broadcast the alert to all the alerting channels. By default, the alert is only sent to the preferred channels.
30
+ *
31
+ * @deprecated This field is no longer needed and will be ignored
32
+ */
33
+ readonly broadcastToAll: pulumi.Output<boolean>;
34
+ /**
35
+ * Condition of the alert.
36
+ */
37
+ readonly condition: pulumi.Output<string>;
38
+ /**
39
+ * Creation time of the alert.
40
+ */
41
+ readonly createAt: pulumi.Output<string>;
42
+ /**
43
+ * Creator of the alert.
44
+ */
45
+ readonly createBy: pulumi.Output<string>;
46
+ /**
47
+ * Description of the alert.
48
+ */
49
+ readonly description: pulumi.Output<string>;
50
+ /**
51
+ * Whether the alert is disabled.
52
+ */
53
+ readonly disabled: pulumi.Output<boolean>;
54
+ /**
55
+ * The evaluation window of the alert. By default, it is 5m0s.
56
+ */
57
+ readonly evalWindow: pulumi.Output<string>;
58
+ /**
59
+ * Evaluation settings for the alert (JSON). Only used when schemaVersion is v2 or higher.
60
+ */
61
+ readonly evaluation: pulumi.Output<string>;
62
+ /**
63
+ * The frequency of the alert. By default, it is 1m0s.
64
+ */
65
+ readonly frequency: pulumi.Output<string>;
66
+ /**
67
+ * Labels of the alert. Severity is a required label.
68
+ */
69
+ readonly labels: pulumi.Output<{
70
+ [key: string]: string;
71
+ }>;
72
+ /**
73
+ * Notification settings for the alert. Only used when schemaVersion is v2 or higher.
74
+ */
75
+ readonly notificationSettings: pulumi.Output<outputs.AlertNotificationSettings>;
76
+ /**
77
+ * Preferred channels of the alert. By default, it is empty.
78
+ */
79
+ readonly preferredChannels: pulumi.Output<string[]>;
80
+ /**
81
+ * Type of the alert. Possible values are: thresholdRule and promql_rule.
82
+ */
83
+ readonly ruleType: pulumi.Output<string>;
84
+ /**
85
+ * Schema version of the alert. By default, it is v1. For v2+ schemas, additional fields like evaluation and notificationSettings are supported.
86
+ */
87
+ readonly schemaVersion: pulumi.Output<string>;
88
+ /**
89
+ * Severity of the alert. Possible values are: info, warning, error, and critical.
90
+ */
91
+ readonly severity: pulumi.Output<string>;
92
+ /**
93
+ * Source of the alert. By default, it is <SIGNOZ_ENDPOINT>/alerts.
94
+ */
95
+ readonly source: pulumi.Output<string>;
96
+ /**
97
+ * State of the alert.
98
+ */
99
+ readonly state: pulumi.Output<string>;
100
+ /**
101
+ * Summary of the alert.
102
+ */
103
+ readonly summary: pulumi.Output<string>;
104
+ /**
105
+ * Last update time of the alert.
106
+ */
107
+ readonly updateAt: pulumi.Output<string>;
108
+ /**
109
+ * Last updater of the alert.
110
+ */
111
+ readonly updateBy: pulumi.Output<string>;
112
+ /**
113
+ * Version of the alert. By default, it is v4.
114
+ */
115
+ readonly version: pulumi.Output<string>;
116
+ /**
117
+ * Create a Alert resource with the given unique name, arguments, and options.
118
+ *
119
+ * @param name The _unique_ name of the resource.
120
+ * @param args The arguments to use to populate this resource's properties.
121
+ * @param opts A bag of options that control this resource's behavior.
122
+ */
123
+ constructor(name: string, args: AlertArgs, opts?: pulumi.CustomResourceOptions);
124
+ }
125
+ /**
126
+ * Input properties used for looking up and filtering Alert resources.
127
+ */
128
+ export interface AlertState {
129
+ /**
130
+ * Name of the alert.
131
+ */
132
+ alert?: pulumi.Input<string | undefined>;
133
+ /**
134
+ * Type of the alert. Possible values are: METRIC_BASED_ALERT, LOGS_BASED_ALERT, TRACES_BASED_ALERT, and EXCEPTIONS_BASED_ALERT.
135
+ */
136
+ alertType?: pulumi.Input<string | undefined>;
137
+ /**
138
+ * Whether to broadcast the alert to all the alerting channels. By default, the alert is only sent to the preferred channels.
139
+ *
140
+ * @deprecated This field is no longer needed and will be ignored
141
+ */
142
+ broadcastToAll?: pulumi.Input<boolean | undefined>;
143
+ /**
144
+ * Condition of the alert.
145
+ */
146
+ condition?: pulumi.Input<string | undefined>;
147
+ /**
148
+ * Creation time of the alert.
149
+ */
150
+ createAt?: pulumi.Input<string | undefined>;
151
+ /**
152
+ * Creator of the alert.
153
+ */
154
+ createBy?: pulumi.Input<string | undefined>;
155
+ /**
156
+ * Description of the alert.
157
+ */
158
+ description?: pulumi.Input<string | undefined>;
159
+ /**
160
+ * Whether the alert is disabled.
161
+ */
162
+ disabled?: pulumi.Input<boolean | undefined>;
163
+ /**
164
+ * The evaluation window of the alert. By default, it is 5m0s.
165
+ */
166
+ evalWindow?: pulumi.Input<string | undefined>;
167
+ /**
168
+ * Evaluation settings for the alert (JSON). Only used when schemaVersion is v2 or higher.
169
+ */
170
+ evaluation?: pulumi.Input<string | undefined>;
171
+ /**
172
+ * The frequency of the alert. By default, it is 1m0s.
173
+ */
174
+ frequency?: pulumi.Input<string | undefined>;
175
+ /**
176
+ * Labels of the alert. Severity is a required label.
177
+ */
178
+ labels?: pulumi.Input<{
179
+ [key: string]: pulumi.Input<string>;
180
+ } | undefined>;
181
+ /**
182
+ * Notification settings for the alert. Only used when schemaVersion is v2 or higher.
183
+ */
184
+ notificationSettings?: pulumi.Input<inputs.AlertNotificationSettings | undefined>;
185
+ /**
186
+ * Preferred channels of the alert. By default, it is empty.
187
+ */
188
+ preferredChannels?: pulumi.Input<pulumi.Input<string>[] | undefined>;
189
+ /**
190
+ * Type of the alert. Possible values are: thresholdRule and promql_rule.
191
+ */
192
+ ruleType?: pulumi.Input<string | undefined>;
193
+ /**
194
+ * Schema version of the alert. By default, it is v1. For v2+ schemas, additional fields like evaluation and notificationSettings are supported.
195
+ */
196
+ schemaVersion?: pulumi.Input<string | undefined>;
197
+ /**
198
+ * Severity of the alert. Possible values are: info, warning, error, and critical.
199
+ */
200
+ severity?: pulumi.Input<string | undefined>;
201
+ /**
202
+ * Source of the alert. By default, it is <SIGNOZ_ENDPOINT>/alerts.
203
+ */
204
+ source?: pulumi.Input<string | undefined>;
205
+ /**
206
+ * State of the alert.
207
+ */
208
+ state?: pulumi.Input<string | undefined>;
209
+ /**
210
+ * Summary of the alert.
211
+ */
212
+ summary?: pulumi.Input<string | undefined>;
213
+ /**
214
+ * Last update time of the alert.
215
+ */
216
+ updateAt?: pulumi.Input<string | undefined>;
217
+ /**
218
+ * Last updater of the alert.
219
+ */
220
+ updateBy?: pulumi.Input<string | undefined>;
221
+ /**
222
+ * Version of the alert. By default, it is v4.
223
+ */
224
+ version?: pulumi.Input<string | undefined>;
225
+ }
226
+ /**
227
+ * The set of arguments for constructing a Alert resource.
228
+ */
229
+ export interface AlertArgs {
230
+ /**
231
+ * Name of the alert.
232
+ */
233
+ alert: pulumi.Input<string>;
234
+ /**
235
+ * Type of the alert. Possible values are: METRIC_BASED_ALERT, LOGS_BASED_ALERT, TRACES_BASED_ALERT, and EXCEPTIONS_BASED_ALERT.
236
+ */
237
+ alertType: pulumi.Input<string>;
238
+ /**
239
+ * Whether to broadcast the alert to all the alerting channels. By default, the alert is only sent to the preferred channels.
240
+ *
241
+ * @deprecated This field is no longer needed and will be ignored
242
+ */
243
+ broadcastToAll?: pulumi.Input<boolean | undefined>;
244
+ /**
245
+ * Condition of the alert.
246
+ */
247
+ condition: pulumi.Input<string>;
248
+ /**
249
+ * Description of the alert.
250
+ */
251
+ description?: pulumi.Input<string | undefined>;
252
+ /**
253
+ * Whether the alert is disabled.
254
+ */
255
+ disabled?: pulumi.Input<boolean | undefined>;
256
+ /**
257
+ * The evaluation window of the alert. By default, it is 5m0s.
258
+ */
259
+ evalWindow?: pulumi.Input<string | undefined>;
260
+ /**
261
+ * Evaluation settings for the alert (JSON). Only used when schemaVersion is v2 or higher.
262
+ */
263
+ evaluation?: pulumi.Input<string | undefined>;
264
+ /**
265
+ * The frequency of the alert. By default, it is 1m0s.
266
+ */
267
+ frequency?: pulumi.Input<string | undefined>;
268
+ /**
269
+ * Labels of the alert. Severity is a required label.
270
+ */
271
+ labels?: pulumi.Input<{
272
+ [key: string]: pulumi.Input<string>;
273
+ } | undefined>;
274
+ /**
275
+ * Notification settings for the alert. Only used when schemaVersion is v2 or higher.
276
+ */
277
+ notificationSettings?: pulumi.Input<inputs.AlertNotificationSettings | undefined>;
278
+ /**
279
+ * Preferred channels of the alert. By default, it is empty.
280
+ */
281
+ preferredChannels?: pulumi.Input<pulumi.Input<string>[] | undefined>;
282
+ /**
283
+ * Type of the alert. Possible values are: thresholdRule and promql_rule.
284
+ */
285
+ ruleType?: pulumi.Input<string | undefined>;
286
+ /**
287
+ * Schema version of the alert. By default, it is v1. For v2+ schemas, additional fields like evaluation and notificationSettings are supported.
288
+ */
289
+ schemaVersion?: pulumi.Input<string | undefined>;
290
+ /**
291
+ * Severity of the alert. Possible values are: info, warning, error, and critical.
292
+ */
293
+ severity: pulumi.Input<string>;
294
+ /**
295
+ * Source of the alert. By default, it is <SIGNOZ_ENDPOINT>/alerts.
296
+ */
297
+ source?: pulumi.Input<string | undefined>;
298
+ /**
299
+ * Summary of the alert.
300
+ */
301
+ summary?: pulumi.Input<string | undefined>;
302
+ /**
303
+ * Version of the alert. By default, it is v4.
304
+ */
305
+ version?: pulumi.Input<string | undefined>;
306
+ }
307
+ //# sourceMappingURL=alert.d.ts.map
package/alert.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../alert.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C,qBAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,KAAK;IAO5H;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,KAAK;IAOhD;;OAEG;IACH,SAAwB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrD;;OAEG;IACH,SAAwB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzD;;;;OAIG;IACH,SAAwB,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/D;;OAEG;IACH,SAAwB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzD;;OAEG;IACH,SAAgC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChE;;OAEG;IACH,SAAgC,QAAQ,EAAE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