/
MonitorOptions.ts
245 lines (238 loc) · 8.15 KB
/
MonitorOptions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { MonitorDeviceID } from "./MonitorDeviceID";
import { MonitorFormulaAndFunctionQueryDefinition } from "./MonitorFormulaAndFunctionQueryDefinition";
import { MonitorOptionsAggregation } from "./MonitorOptionsAggregation";
import { MonitorRenotifyStatusType } from "./MonitorRenotifyStatusType";
import { MonitorThresholdWindowOptions } from "./MonitorThresholdWindowOptions";
import { MonitorThresholds } from "./MonitorThresholds";
import { AttributeTypeMap } from "../util";
/**
* List of options associated with your monitor.
*/
export class MonitorOptions {
"aggregation"?: MonitorOptionsAggregation;
/**
* IDs of the device the Synthetics monitor is running on.
*/
"deviceIds"?: Array<MonitorDeviceID>;
/**
* Whether or not to send a log sample when the log monitor triggers.
*/
"enableLogsSample"?: boolean;
/**
* We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify), block in the original message instead. A message to include with a re-notification. Supports the `@username` notification we allow elsewhere. Not applicable if `renotify_interval` is `None`.
*/
"escalationMessage"?: string;
/**
* Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to `300` (5min), the timeframe is set to `last_5m` and the time is 7:00, the monitor evaluates data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation.
*/
"evaluationDelay"?: number;
/**
* Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold.
*/
"groupbySimpleMonitor"?: boolean;
/**
* A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title. **Examples** - If `True`, `[Triggered on {host:h1}] Monitor Title` - If `False`, `[Triggered] Monitor Title`
*/
"includeTags"?: boolean;
/**
* Whether or not the monitor is locked (only editable by creator and admins). Use `restricted_roles` instead.
*/
"locked"?: boolean;
/**
* How long the test should be in failure before alerting (integer, number of seconds, max 7200).
*/
"minFailureDuration"?: number;
/**
* The minimum number of locations in failure at the same time during at least one moment in the `min_failure_duration` period (`min_location_failed` and `min_failure_duration` are part of the advanced alerting rules - integer, >= 1).
*/
"minLocationFailed"?: number;
/**
* Time (in seconds) to skip evaluations for new groups. For example, this option can be used to skip evaluations for new hosts while they initialize. Must be a non negative integer.
*/
"newGroupDelay"?: number;
/**
* Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non negative integer. Use new_group_delay instead.
*/
"newHostDelay"?: number;
/**
* The number of minutes before a monitor notifies after data stops reporting. Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks.
*/
"noDataTimeframe"?: number;
/**
* A Boolean indicating whether tagged users is notified on changes to this monitor.
*/
"notifyAudit"?: boolean;
/**
* A Boolean indicating whether this monitor notifies when data stops reporting.
*/
"notifyNoData"?: boolean;
/**
* The number of minutes after the last notification before a monitor re-notifies on the current status. It only re-notifies if it’s not resolved.
*/
"renotifyInterval"?: number;
/**
* The number of times re-notification messages should be sent on the current status at the provided re-notification interval.
*/
"renotifyOccurrences"?: number;
/**
* The types of monitor statuses for which re-notification messages are sent.
*/
"renotifyStatuses"?: Array<MonitorRenotifyStatusType>;
/**
* A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly recommend you set this to `false` for sparse metrics, otherwise some evaluations are skipped. Default is false.
*/
"requireFullWindow"?: boolean;
/**
* Information about the downtime applied to the monitor.
*/
"silenced"?: { [key: string]: number };
/**
* ID of the corresponding Synthetic check.
*/
"syntheticsCheckId"?: string;
"thresholdWindows"?: MonitorThresholdWindowOptions;
"thresholds"?: MonitorThresholds;
/**
* The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.
*/
"timeoutH"?: number;
/**
* List of requests that can be used in the monitor query. **This feature is currently in beta.**
*/
"variables"?: Array<MonitorFormulaAndFunctionQueryDefinition>;
/**
* @ignore
*/
"unparsedObject"?: any;
/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
aggregation: {
baseName: "aggregation",
type: "MonitorOptionsAggregation",
},
deviceIds: {
baseName: "device_ids",
type: "Array<MonitorDeviceID>",
},
enableLogsSample: {
baseName: "enable_logs_sample",
type: "boolean",
},
escalationMessage: {
baseName: "escalation_message",
type: "string",
},
evaluationDelay: {
baseName: "evaluation_delay",
type: "number",
format: "int64",
},
groupbySimpleMonitor: {
baseName: "groupby_simple_monitor",
type: "boolean",
},
includeTags: {
baseName: "include_tags",
type: "boolean",
},
locked: {
baseName: "locked",
type: "boolean",
},
minFailureDuration: {
baseName: "min_failure_duration",
type: "number",
format: "int64",
},
minLocationFailed: {
baseName: "min_location_failed",
type: "number",
format: "int64",
},
newGroupDelay: {
baseName: "new_group_delay",
type: "number",
format: "int64",
},
newHostDelay: {
baseName: "new_host_delay",
type: "number",
format: "int64",
},
noDataTimeframe: {
baseName: "no_data_timeframe",
type: "number",
format: "int64",
},
notifyAudit: {
baseName: "notify_audit",
type: "boolean",
},
notifyNoData: {
baseName: "notify_no_data",
type: "boolean",
},
renotifyInterval: {
baseName: "renotify_interval",
type: "number",
format: "int64",
},
renotifyOccurrences: {
baseName: "renotify_occurrences",
type: "number",
format: "int64",
},
renotifyStatuses: {
baseName: "renotify_statuses",
type: "Array<MonitorRenotifyStatusType>",
},
requireFullWindow: {
baseName: "require_full_window",
type: "boolean",
},
silenced: {
baseName: "silenced",
type: "{ [key: string]: number; }",
format: "int64",
},
syntheticsCheckId: {
baseName: "synthetics_check_id",
type: "string",
},
thresholdWindows: {
baseName: "threshold_windows",
type: "MonitorThresholdWindowOptions",
},
thresholds: {
baseName: "thresholds",
type: "MonitorThresholds",
},
timeoutH: {
baseName: "timeout_h",
type: "number",
format: "int64",
},
variables: {
baseName: "variables",
type: "Array<MonitorFormulaAndFunctionQueryDefinition>",
},
};
/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return MonitorOptions.attributeTypeMap;
}
public constructor() {}
}