1
- // Copyright 2021 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -51,7 +51,8 @@ message AlertPolicy {
51
51
// The text of the documentation, interpreted according to `mime_type`.
52
52
// The content may not exceed 8,192 Unicode characters and may not exceed
53
53
// more than 10,240 bytes when encoded in UTF-8 format, whichever is
54
- // smaller.
54
+ // smaller. This text can be [templatized by using
55
+ // variables](https://cloud.google.com/monitoring/alerts/doc-variables).
55
56
string content = 1 ;
56
57
57
58
// The format of the `content` field. Presently, only the value
@@ -87,6 +88,26 @@ message AlertPolicy {
87
88
}
88
89
}
89
90
91
+ // A condition control that determines how metric-threshold conditions
92
+ // are evaluated when data stops arriving.
93
+ // This control doesn't affect metric-absence policies.
94
+ enum EvaluationMissingData {
95
+ // An unspecified evaluation missing data option. Equivalent to
96
+ // EVALUATION_MISSING_DATA_NO_OP.
97
+ EVALUATION_MISSING_DATA_UNSPECIFIED = 0 ;
98
+
99
+ // If there is no data to evaluate the condition, then evaluate the
100
+ // condition as false.
101
+ EVALUATION_MISSING_DATA_INACTIVE = 1 ;
102
+
103
+ // If there is no data to evaluate the condition, then evaluate the
104
+ // condition as true.
105
+ EVALUATION_MISSING_DATA_ACTIVE = 2 ;
106
+
107
+ // Do not evaluate the condition to any value if there is no data.
108
+ EVALUATION_MISSING_DATA_NO_OP = 3 ;
109
+ }
110
+
90
111
// A condition type that compares a collection of time series
91
112
// against a threshold.
92
113
message MetricThreshold {
@@ -168,6 +189,10 @@ message AlertPolicy {
168
189
// or by the ratio, if `denominator_filter` and `denominator_aggregations`
169
190
// are specified.
170
191
Trigger trigger = 7 ;
192
+
193
+ // A condition control that determines how metric-threshold conditions
194
+ // are evaluated when data stops arriving.
195
+ EvaluationMissingData evaluation_missing_data = 11 ;
171
196
}
172
197
173
198
// A condition type that checks that monitored resources
@@ -267,20 +292,24 @@ message AlertPolicy {
267
292
// or by the ratio, if `denominator_filter` and `denominator_aggregations`
268
293
// are specified.
269
294
Trigger trigger = 3 ;
295
+
296
+ // A condition control that determines how metric-threshold conditions
297
+ // are evaluated when data stops arriving.
298
+ EvaluationMissingData evaluation_missing_data = 4 ;
270
299
}
271
300
272
301
// Required if the condition exists. The unique resource name for this
273
302
// condition. Its format is:
274
303
//
275
304
// projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
276
305
//
277
- // `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the
306
+ // `[CONDITION_ID]` is assigned by Cloud Monitoring when the
278
307
// condition is created as part of a new or updated alerting policy.
279
308
//
280
309
// When calling the
281
310
// [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
282
311
// method, do not include the `name` field in the conditions of the
283
- // requested alerting policy. Stackdriver Monitoring creates the
312
+ // requested alerting policy. Cloud Monitoring creates the
284
313
// condition identifiers and includes them in the new policy.
285
314
//
286
315
// When calling the
@@ -320,26 +349,6 @@ message AlertPolicy {
320
349
}
321
350
}
322
351
323
- // Control over how the notification channels in `notification_channels`
324
- // are notified when this alert fires.
325
- message AlertStrategy {
326
- // Control over the rate of notifications sent to this alert policy's
327
- // notification channels.
328
- message NotificationRateLimit {
329
- // Not more than one notification per `period`.
330
- google.protobuf.Duration period = 1 ;
331
- }
332
-
333
- // Required for alert policies with a `LogMatch` condition.
334
- //
335
- // This limit is not implemented for alert policies that are not log-based.
336
- NotificationRateLimit notification_rate_limit = 1 ;
337
-
338
- // If an alert policy that was active has no data for this long, any open
339
- // incidents will close
340
- google.protobuf.Duration auto_close = 3 ;
341
- }
342
-
343
352
// Operators for combining conditions.
344
353
enum ConditionCombinerType {
345
354
// An unspecified combiner.
@@ -361,12 +370,32 @@ message AlertPolicy {
361
370
AND_WITH_MATCHING_RESOURCE = 3 ;
362
371
}
363
372
373
+ // Control over how the notification channels in `notification_channels`
374
+ // are notified when this alert fires.
375
+ message AlertStrategy {
376
+ // Control over the rate of notifications sent to this alert policy's
377
+ // notification channels.
378
+ message NotificationRateLimit {
379
+ // Not more than one notification per `period`.
380
+ google.protobuf.Duration period = 1 ;
381
+ }
382
+
383
+ // Required for alert policies with a `LogMatch` condition.
384
+ //
385
+ // This limit is not implemented for alert policies that are not log-based.
386
+ NotificationRateLimit notification_rate_limit = 1 ;
387
+
388
+ // If an alert policy that was active has no data for this long, any open
389
+ // incidents will close
390
+ google.protobuf.Duration auto_close = 3 ;
391
+ }
392
+
364
393
// Required if the policy exists. The resource name for this policy. The
365
394
// format is:
366
395
//
367
396
// projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
368
397
//
369
- // `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy
398
+ // `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy
370
399
// is created. When calling the
371
400
// [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
372
401
// method, do not include the `name` field in the alerting policy passed as
0 commit comments