/
alert.pb.go
1638 lines (1491 loc) · 77.8 KB
/
alert.pb.go
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.12.2
// source: google/monitoring/v3/alert.proto
package monitoring
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Operators for combining conditions.
type AlertPolicy_ConditionCombinerType int32
const (
// An unspecified combiner.
AlertPolicy_COMBINE_UNSPECIFIED AlertPolicy_ConditionCombinerType = 0
// Combine conditions using the logical `AND` operator. An
// incident is created only if all the conditions are met
// simultaneously. This combiner is satisfied if all conditions are
// met, even if they are met on completely different resources.
AlertPolicy_AND AlertPolicy_ConditionCombinerType = 1
// Combine conditions using the logical `OR` operator. An incident
// is created if any of the listed conditions is met.
AlertPolicy_OR AlertPolicy_ConditionCombinerType = 2
// Combine conditions using logical `AND` operator, but unlike the regular
// `AND` option, an incident is created only if all conditions are met
// simultaneously on at least one resource.
AlertPolicy_AND_WITH_MATCHING_RESOURCE AlertPolicy_ConditionCombinerType = 3
)
// Enum value maps for AlertPolicy_ConditionCombinerType.
var (
AlertPolicy_ConditionCombinerType_name = map[int32]string{
0: "COMBINE_UNSPECIFIED",
1: "AND",
2: "OR",
3: "AND_WITH_MATCHING_RESOURCE",
}
AlertPolicy_ConditionCombinerType_value = map[string]int32{
"COMBINE_UNSPECIFIED": 0,
"AND": 1,
"OR": 2,
"AND_WITH_MATCHING_RESOURCE": 3,
}
)
func (x AlertPolicy_ConditionCombinerType) Enum() *AlertPolicy_ConditionCombinerType {
p := new(AlertPolicy_ConditionCombinerType)
*p = x
return p
}
func (x AlertPolicy_ConditionCombinerType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AlertPolicy_ConditionCombinerType) Descriptor() protoreflect.EnumDescriptor {
return file_google_monitoring_v3_alert_proto_enumTypes[0].Descriptor()
}
func (AlertPolicy_ConditionCombinerType) Type() protoreflect.EnumType {
return &file_google_monitoring_v3_alert_proto_enumTypes[0]
}
func (x AlertPolicy_ConditionCombinerType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AlertPolicy_ConditionCombinerType.Descriptor instead.
func (AlertPolicy_ConditionCombinerType) EnumDescriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 0}
}
// A description of the conditions under which some aspect of your system is
// considered to be "unhealthy" and the ways to notify people or services about
// this state. For an overview of alert policies, see
// [Introduction to Alerting](https://cloud.google.com/monitoring/alerts/).
type AlertPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required if the policy exists. The resource name for this policy. The
// format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
//
// `[ALERT_POLICY_ID]` is assigned by Stackdriver Monitoring when the policy
// is created. When calling the
// [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
// method, do not include the `name` field in the alerting policy passed as
// part of the request.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A short name or phrase used to identify the policy in dashboards,
// notifications, and incidents. To avoid confusion, don't use the same
// display name for multiple policies in the same project. The name is
// limited to 512 Unicode characters.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Documentation that is included with notifications and incidents related to
// this policy. Best practice is for the documentation to include information
// to help responders understand, mitigate, escalate, and correct the
// underlying problems detected by the alerting policy. Notification channels
// that have limited capacity might not show this documentation.
Documentation *AlertPolicy_Documentation `protobuf:"bytes,13,opt,name=documentation,proto3" json:"documentation,omitempty"`
// User-supplied key/value data to be used for organizing and
// identifying the `AlertPolicy` objects.
//
// The field can contain up to 64 entries. Each key and value is limited to
// 63 Unicode characters or 128 bytes, whichever is smaller. Labels and
// values can contain only lowercase letters, numerals, underscores, and
// dashes. Keys must begin with a letter.
UserLabels map[string]string `protobuf:"bytes,16,rep,name=user_labels,json=userLabels,proto3" json:"user_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// A list of conditions for the policy. The conditions are combined by AND or
// OR according to the `combiner` field. If the combined conditions evaluate
// to true, then an incident is created. A policy can have from one to six
// conditions.
// If `condition_time_series_query_language` is present, it must be the only
// `condition`.
Conditions []*AlertPolicy_Condition `protobuf:"bytes,12,rep,name=conditions,proto3" json:"conditions,omitempty"`
// How to combine the results of multiple conditions to determine if an
// incident should be opened.
// If `condition_time_series_query_language` is present, this must be
// `COMBINE_UNSPECIFIED`.
Combiner AlertPolicy_ConditionCombinerType `protobuf:"varint,6,opt,name=combiner,proto3,enum=google.monitoring.v3.AlertPolicy_ConditionCombinerType" json:"combiner,omitempty"`
// Whether or not the policy is enabled. On write, the default interpretation
// if unset is that the policy is enabled. On read, clients should not make
// any assumption about the state if it has not been populated. The
// field should always be populated on List and Get operations, unless
// a field projection has been specified that strips it out.
Enabled *wrapperspb.BoolValue `protobuf:"bytes,17,opt,name=enabled,proto3" json:"enabled,omitempty"`
// Read-only description of how the alert policy is invalid. OK if the alert
// policy is valid. If not OK, the alert policy will not generate incidents.
Validity *status.Status `protobuf:"bytes,18,opt,name=validity,proto3" json:"validity,omitempty"`
// Identifies the notification channels to which notifications should be sent
// when incidents are opened or closed or when new violations occur on
// an already opened incident. Each element of this array corresponds to
// the `name` field in each of the
// [`NotificationChannel`][google.monitoring.v3.NotificationChannel]
// objects that are returned from the [`ListNotificationChannels`]
// [google.monitoring.v3.NotificationChannelService.ListNotificationChannels]
// method. The format of the entries in this field is:
//
// projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
NotificationChannels []string `protobuf:"bytes,14,rep,name=notification_channels,json=notificationChannels,proto3" json:"notification_channels,omitempty"`
// A read-only record of the creation of the alerting policy. If provided
// in a call to create or update, this field will be ignored.
CreationRecord *MutationRecord `protobuf:"bytes,10,opt,name=creation_record,json=creationRecord,proto3" json:"creation_record,omitempty"`
// A read-only record of the most recent change to the alerting policy. If
// provided in a call to create or update, this field will be ignored.
MutationRecord *MutationRecord `protobuf:"bytes,11,opt,name=mutation_record,json=mutationRecord,proto3" json:"mutation_record,omitempty"`
// Control over how this alert policy's notification channels are notified.
AlertStrategy *AlertPolicy_AlertStrategy `protobuf:"bytes,21,opt,name=alert_strategy,json=alertStrategy,proto3" json:"alert_strategy,omitempty"`
}
func (x *AlertPolicy) Reset() {
*x = AlertPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy) ProtoMessage() {}
func (x *AlertPolicy) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy.ProtoReflect.Descriptor instead.
func (*AlertPolicy) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0}
}
func (x *AlertPolicy) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AlertPolicy) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (x *AlertPolicy) GetDocumentation() *AlertPolicy_Documentation {
if x != nil {
return x.Documentation
}
return nil
}
func (x *AlertPolicy) GetUserLabels() map[string]string {
if x != nil {
return x.UserLabels
}
return nil
}
func (x *AlertPolicy) GetConditions() []*AlertPolicy_Condition {
if x != nil {
return x.Conditions
}
return nil
}
func (x *AlertPolicy) GetCombiner() AlertPolicy_ConditionCombinerType {
if x != nil {
return x.Combiner
}
return AlertPolicy_COMBINE_UNSPECIFIED
}
func (x *AlertPolicy) GetEnabled() *wrapperspb.BoolValue {
if x != nil {
return x.Enabled
}
return nil
}
func (x *AlertPolicy) GetValidity() *status.Status {
if x != nil {
return x.Validity
}
return nil
}
func (x *AlertPolicy) GetNotificationChannels() []string {
if x != nil {
return x.NotificationChannels
}
return nil
}
func (x *AlertPolicy) GetCreationRecord() *MutationRecord {
if x != nil {
return x.CreationRecord
}
return nil
}
func (x *AlertPolicy) GetMutationRecord() *MutationRecord {
if x != nil {
return x.MutationRecord
}
return nil
}
func (x *AlertPolicy) GetAlertStrategy() *AlertPolicy_AlertStrategy {
if x != nil {
return x.AlertStrategy
}
return nil
}
// A content string and a MIME type that describes the content string's
// format.
type AlertPolicy_Documentation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The text of the documentation, interpreted according to `mime_type`.
// The content may not exceed 8,192 Unicode characters and may not exceed
// more than 10,240 bytes when encoded in UTF-8 format, whichever is
// smaller.
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// The format of the `content` field. Presently, only the value
// `"text/markdown"` is supported. See
// [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information.
MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
}
func (x *AlertPolicy_Documentation) Reset() {
*x = AlertPolicy_Documentation{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Documentation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Documentation) ProtoMessage() {}
func (x *AlertPolicy_Documentation) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Documentation.ProtoReflect.Descriptor instead.
func (*AlertPolicy_Documentation) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 0}
}
func (x *AlertPolicy_Documentation) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *AlertPolicy_Documentation) GetMimeType() string {
if x != nil {
return x.MimeType
}
return ""
}
// A condition is a true/false test that determines when an alerting policy
// should open an incident. If a condition evaluates to true, it signifies
// that something is wrong.
type AlertPolicy_Condition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required if the condition exists. The unique resource name for this
// condition. Its format is:
//
// projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID]
//
// `[CONDITION_ID]` is assigned by Stackdriver Monitoring when the
// condition is created as part of a new or updated alerting policy.
//
// When calling the
// [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
// method, do not include the `name` field in the conditions of the
// requested alerting policy. Stackdriver Monitoring creates the
// condition identifiers and includes them in the new policy.
//
// When calling the
// [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
// method to update a policy, including a condition `name` causes the
// existing condition to be updated. Conditions without names are added to
// the updated policy. Existing conditions are deleted if they are not
// updated.
//
// Best practice is to preserve `[CONDITION_ID]` if you make only small
// changes, such as those to condition thresholds, durations, or trigger
// values. Otherwise, treat the change as a new condition and let the
// existing condition be deleted.
Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"`
// A short name or phrase used to identify the condition in dashboards,
// notifications, and incidents. To avoid confusion, don't use the same
// display name for multiple conditions in the same policy.
DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Only one of the following condition types will be specified.
//
// Types that are assignable to Condition:
// *AlertPolicy_Condition_ConditionThreshold
// *AlertPolicy_Condition_ConditionAbsent
// *AlertPolicy_Condition_ConditionMatchedLog
// *AlertPolicy_Condition_ConditionMonitoringQueryLanguage
Condition isAlertPolicy_Condition_Condition `protobuf_oneof:"condition"`
}
func (x *AlertPolicy_Condition) Reset() {
*x = AlertPolicy_Condition{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Condition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Condition) ProtoMessage() {}
func (x *AlertPolicy_Condition) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Condition.ProtoReflect.Descriptor instead.
func (*AlertPolicy_Condition) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 1}
}
func (x *AlertPolicy_Condition) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *AlertPolicy_Condition) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *AlertPolicy_Condition) GetCondition() isAlertPolicy_Condition_Condition {
if m != nil {
return m.Condition
}
return nil
}
func (x *AlertPolicy_Condition) GetConditionThreshold() *AlertPolicy_Condition_MetricThreshold {
if x, ok := x.GetCondition().(*AlertPolicy_Condition_ConditionThreshold); ok {
return x.ConditionThreshold
}
return nil
}
func (x *AlertPolicy_Condition) GetConditionAbsent() *AlertPolicy_Condition_MetricAbsence {
if x, ok := x.GetCondition().(*AlertPolicy_Condition_ConditionAbsent); ok {
return x.ConditionAbsent
}
return nil
}
func (x *AlertPolicy_Condition) GetConditionMatchedLog() *AlertPolicy_Condition_LogMatch {
if x, ok := x.GetCondition().(*AlertPolicy_Condition_ConditionMatchedLog); ok {
return x.ConditionMatchedLog
}
return nil
}
func (x *AlertPolicy_Condition) GetConditionMonitoringQueryLanguage() *AlertPolicy_Condition_MonitoringQueryLanguageCondition {
if x, ok := x.GetCondition().(*AlertPolicy_Condition_ConditionMonitoringQueryLanguage); ok {
return x.ConditionMonitoringQueryLanguage
}
return nil
}
type isAlertPolicy_Condition_Condition interface {
isAlertPolicy_Condition_Condition()
}
type AlertPolicy_Condition_ConditionThreshold struct {
// A condition that compares a time series against a threshold.
ConditionThreshold *AlertPolicy_Condition_MetricThreshold `protobuf:"bytes,1,opt,name=condition_threshold,json=conditionThreshold,proto3,oneof"`
}
type AlertPolicy_Condition_ConditionAbsent struct {
// A condition that checks that a time series continues to
// receive new data points.
ConditionAbsent *AlertPolicy_Condition_MetricAbsence `protobuf:"bytes,2,opt,name=condition_absent,json=conditionAbsent,proto3,oneof"`
}
type AlertPolicy_Condition_ConditionMatchedLog struct {
// A condition that checks for log messages matching given constraints. If
// set, no other conditions can be present.
ConditionMatchedLog *AlertPolicy_Condition_LogMatch `protobuf:"bytes,20,opt,name=condition_matched_log,json=conditionMatchedLog,proto3,oneof"`
}
type AlertPolicy_Condition_ConditionMonitoringQueryLanguage struct {
// A condition that uses the Monitoring Query Language to define
// alerts.
ConditionMonitoringQueryLanguage *AlertPolicy_Condition_MonitoringQueryLanguageCondition `protobuf:"bytes,19,opt,name=condition_monitoring_query_language,json=conditionMonitoringQueryLanguage,proto3,oneof"`
}
func (*AlertPolicy_Condition_ConditionThreshold) isAlertPolicy_Condition_Condition() {}
func (*AlertPolicy_Condition_ConditionAbsent) isAlertPolicy_Condition_Condition() {}
func (*AlertPolicy_Condition_ConditionMatchedLog) isAlertPolicy_Condition_Condition() {}
func (*AlertPolicy_Condition_ConditionMonitoringQueryLanguage) isAlertPolicy_Condition_Condition() {}
// Control over how the notification channels in `notification_channels`
// are notified when this alert fires.
type AlertPolicy_AlertStrategy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required for alert policies with a `LogMatch` condition.
//
// This limit is not implemented for alert policies that are not log-based.
NotificationRateLimit *AlertPolicy_AlertStrategy_NotificationRateLimit `protobuf:"bytes,1,opt,name=notification_rate_limit,json=notificationRateLimit,proto3" json:"notification_rate_limit,omitempty"`
}
func (x *AlertPolicy_AlertStrategy) Reset() {
*x = AlertPolicy_AlertStrategy{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_AlertStrategy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_AlertStrategy) ProtoMessage() {}
func (x *AlertPolicy_AlertStrategy) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_AlertStrategy.ProtoReflect.Descriptor instead.
func (*AlertPolicy_AlertStrategy) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 2}
}
func (x *AlertPolicy_AlertStrategy) GetNotificationRateLimit() *AlertPolicy_AlertStrategy_NotificationRateLimit {
if x != nil {
return x.NotificationRateLimit
}
return nil
}
// Specifies how many time series must fail a predicate to trigger a
// condition. If not specified, then a `{count: 1}` trigger is used.
type AlertPolicy_Condition_Trigger struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A type of trigger.
//
// Types that are assignable to Type:
// *AlertPolicy_Condition_Trigger_Count
// *AlertPolicy_Condition_Trigger_Percent
Type isAlertPolicy_Condition_Trigger_Type `protobuf_oneof:"type"`
}
func (x *AlertPolicy_Condition_Trigger) Reset() {
*x = AlertPolicy_Condition_Trigger{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Condition_Trigger) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Condition_Trigger) ProtoMessage() {}
func (x *AlertPolicy_Condition_Trigger) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Condition_Trigger.ProtoReflect.Descriptor instead.
func (*AlertPolicy_Condition_Trigger) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 1, 0}
}
func (m *AlertPolicy_Condition_Trigger) GetType() isAlertPolicy_Condition_Trigger_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *AlertPolicy_Condition_Trigger) GetCount() int32 {
if x, ok := x.GetType().(*AlertPolicy_Condition_Trigger_Count); ok {
return x.Count
}
return 0
}
func (x *AlertPolicy_Condition_Trigger) GetPercent() float64 {
if x, ok := x.GetType().(*AlertPolicy_Condition_Trigger_Percent); ok {
return x.Percent
}
return 0
}
type isAlertPolicy_Condition_Trigger_Type interface {
isAlertPolicy_Condition_Trigger_Type()
}
type AlertPolicy_Condition_Trigger_Count struct {
// The absolute number of time series that must fail
// the predicate for the condition to be triggered.
Count int32 `protobuf:"varint,1,opt,name=count,proto3,oneof"`
}
type AlertPolicy_Condition_Trigger_Percent struct {
// The percentage of time series that must fail the
// predicate for the condition to be triggered.
Percent float64 `protobuf:"fixed64,2,opt,name=percent,proto3,oneof"`
}
func (*AlertPolicy_Condition_Trigger_Count) isAlertPolicy_Condition_Trigger_Type() {}
func (*AlertPolicy_Condition_Trigger_Percent) isAlertPolicy_Condition_Trigger_Type() {}
// A condition type that compares a collection of time series
// against a threshold.
type AlertPolicy_Condition_MetricThreshold struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
// identifies which time series should be compared with the threshold.
//
// The filter is similar to the one that is specified in the
// [`ListTimeSeries`
// request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
// (that call is useful to verify the time series that will be retrieved /
// processed). The filter must specify the metric type and the resource
// type. Optionally, it can specify resource labels and metric labels.
// This field must not exceed 2048 Unicode characters in length.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Specifies the alignment of data points in individual time series as
// well as how to combine the retrieved time series together (such as
// when aggregating multiple streams on each resource to a single
// stream for each resource or when aggregating streams across all
// members of a group of resources). Multiple aggregations
// are applied in the order specified.
//
// This field is similar to the one in the [`ListTimeSeries`
// request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
// It is advisable to use the `ListTimeSeries` method when debugging this
// field.
Aggregations []*Aggregation `protobuf:"bytes,8,rep,name=aggregations,proto3" json:"aggregations,omitempty"`
// A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
// identifies a time series that should be used as the denominator of a
// ratio that will be compared with the threshold. If a
// `denominator_filter` is specified, the time series specified by the
// `filter` field will be used as the numerator.
//
// The filter must specify the metric type and optionally may contain
// restrictions on resource type, resource labels, and metric labels.
// This field may not exceed 2048 Unicode characters in length.
DenominatorFilter string `protobuf:"bytes,9,opt,name=denominator_filter,json=denominatorFilter,proto3" json:"denominator_filter,omitempty"`
// Specifies the alignment of data points in individual time series
// selected by `denominatorFilter` as
// well as how to combine the retrieved time series together (such as
// when aggregating multiple streams on each resource to a single
// stream for each resource or when aggregating streams across all
// members of a group of resources).
//
// When computing ratios, the `aggregations` and
// `denominator_aggregations` fields must use the same alignment period
// and produce time series that have the same periodicity and labels.
DenominatorAggregations []*Aggregation `protobuf:"bytes,10,rep,name=denominator_aggregations,json=denominatorAggregations,proto3" json:"denominator_aggregations,omitempty"`
// The comparison to apply between the time series (indicated by `filter`
// and `aggregation`) and the threshold (indicated by `threshold_value`).
// The comparison is applied on each time series, with the time series
// on the left-hand side and the threshold on the right-hand side.
//
// Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently.
Comparison ComparisonType `protobuf:"varint,4,opt,name=comparison,proto3,enum=google.monitoring.v3.ComparisonType" json:"comparison,omitempty"`
// A value against which to compare the time series.
ThresholdValue float64 `protobuf:"fixed64,5,opt,name=threshold_value,json=thresholdValue,proto3" json:"threshold_value,omitempty"`
// The amount of time that a time series must violate the
// threshold to be considered failing. Currently, only values
// that are a multiple of a minute--e.g., 0, 60, 120, or 300
// seconds--are supported. If an invalid value is given, an
// error will be returned. When choosing a duration, it is useful to
// keep in mind the frequency of the underlying time series data
// (which may also be affected by any alignments specified in the
// `aggregations` field); a good duration is long enough so that a single
// outlier does not generate spurious alerts, but short enough that
// unhealthy states are detected and alerted on quickly.
Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"`
// The number/percent of time series for which the comparison must hold
// in order for the condition to trigger. If unspecified, then the
// condition will trigger if the comparison is true for any of the
// time series that have been identified by `filter` and `aggregations`,
// or by the ratio, if `denominator_filter` and `denominator_aggregations`
// are specified.
Trigger *AlertPolicy_Condition_Trigger `protobuf:"bytes,7,opt,name=trigger,proto3" json:"trigger,omitempty"`
}
func (x *AlertPolicy_Condition_MetricThreshold) Reset() {
*x = AlertPolicy_Condition_MetricThreshold{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Condition_MetricThreshold) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Condition_MetricThreshold) ProtoMessage() {}
func (x *AlertPolicy_Condition_MetricThreshold) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Condition_MetricThreshold.ProtoReflect.Descriptor instead.
func (*AlertPolicy_Condition_MetricThreshold) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 1, 1}
}
func (x *AlertPolicy_Condition_MetricThreshold) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
func (x *AlertPolicy_Condition_MetricThreshold) GetAggregations() []*Aggregation {
if x != nil {
return x.Aggregations
}
return nil
}
func (x *AlertPolicy_Condition_MetricThreshold) GetDenominatorFilter() string {
if x != nil {
return x.DenominatorFilter
}
return ""
}
func (x *AlertPolicy_Condition_MetricThreshold) GetDenominatorAggregations() []*Aggregation {
if x != nil {
return x.DenominatorAggregations
}
return nil
}
func (x *AlertPolicy_Condition_MetricThreshold) GetComparison() ComparisonType {
if x != nil {
return x.Comparison
}
return ComparisonType_COMPARISON_UNSPECIFIED
}
func (x *AlertPolicy_Condition_MetricThreshold) GetThresholdValue() float64 {
if x != nil {
return x.ThresholdValue
}
return 0
}
func (x *AlertPolicy_Condition_MetricThreshold) GetDuration() *durationpb.Duration {
if x != nil {
return x.Duration
}
return nil
}
func (x *AlertPolicy_Condition_MetricThreshold) GetTrigger() *AlertPolicy_Condition_Trigger {
if x != nil {
return x.Trigger
}
return nil
}
// A condition type that checks that monitored resources
// are reporting data. The configuration defines a metric and
// a set of monitored resources. The predicate is considered in violation
// when a time series for the specified metric of a monitored
// resource does not include any data in the specified `duration`.
type AlertPolicy_Condition_MetricAbsence struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. A [filter](https://cloud.google.com/monitoring/api/v3/filters) that
// identifies which time series should be compared with the threshold.
//
// The filter is similar to the one that is specified in the
// [`ListTimeSeries`
// request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)
// (that call is useful to verify the time series that will be retrieved /
// processed). The filter must specify the metric type and the resource
// type. Optionally, it can specify resource labels and metric labels.
// This field must not exceed 2048 Unicode characters in length.
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
// Specifies the alignment of data points in individual time series as
// well as how to combine the retrieved time series together (such as
// when aggregating multiple streams on each resource to a single
// stream for each resource or when aggregating streams across all
// members of a group of resources). Multiple aggregations
// are applied in the order specified.
//
// This field is similar to the one in the [`ListTimeSeries`
// request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
// It is advisable to use the `ListTimeSeries` method when debugging this
// field.
Aggregations []*Aggregation `protobuf:"bytes,5,rep,name=aggregations,proto3" json:"aggregations,omitempty"`
// The amount of time that a time series must fail to report new
// data to be considered failing. The minimum value of this field
// is 120 seconds. Larger values that are a multiple of a
// minute--for example, 240 or 300 seconds--are supported.
// If an invalid value is given, an
// error will be returned. The `Duration.nanos` field is
// ignored.
Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"`
// The number/percent of time series for which the comparison must hold
// in order for the condition to trigger. If unspecified, then the
// condition will trigger if the comparison is true for any of the
// time series that have been identified by `filter` and `aggregations`.
Trigger *AlertPolicy_Condition_Trigger `protobuf:"bytes,3,opt,name=trigger,proto3" json:"trigger,omitempty"`
}
func (x *AlertPolicy_Condition_MetricAbsence) Reset() {
*x = AlertPolicy_Condition_MetricAbsence{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Condition_MetricAbsence) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Condition_MetricAbsence) ProtoMessage() {}
func (x *AlertPolicy_Condition_MetricAbsence) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Condition_MetricAbsence.ProtoReflect.Descriptor instead.
func (*AlertPolicy_Condition_MetricAbsence) Descriptor() ([]byte, []int) {
return file_google_monitoring_v3_alert_proto_rawDescGZIP(), []int{0, 1, 2}
}
func (x *AlertPolicy_Condition_MetricAbsence) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
func (x *AlertPolicy_Condition_MetricAbsence) GetAggregations() []*Aggregation {
if x != nil {
return x.Aggregations
}
return nil
}
func (x *AlertPolicy_Condition_MetricAbsence) GetDuration() *durationpb.Duration {
if x != nil {
return x.Duration
}
return nil
}
func (x *AlertPolicy_Condition_MetricAbsence) GetTrigger() *AlertPolicy_Condition_Trigger {
if x != nil {
return x.Trigger
}
return nil
}
// A condition type that checks whether a log message in the [scoping
// project](https://cloud.google.com/monitoring/api/v3#project_name)
// satisfies the given filter. Logs from other projects in the metrics
// scope are not evaluated.
type AlertPolicy_Condition_LogMatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. A logs-based filter. See [Advanced Logs
// Queries](https://cloud.google.com/logging/docs/view/advanced-queries)
// for how this filter should be constructed.
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
// Optional. A map from a label key to an extractor expression, which is
// used to extract the value for this label key. Each entry in this map is
// a specification for how data should be extracted from log entries that
// match `filter`. Each combination of extracted values is treated as a
// separate rule for the purposes of triggering notifications. Label keys
// and corresponding values can be used in notifications generated by this
// condition.
//
// Please see [the documentation on logs-based metric
// `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
// for syntax and examples.
LabelExtractors map[string]string `protobuf:"bytes,2,rep,name=label_extractors,json=labelExtractors,proto3" json:"label_extractors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *AlertPolicy_Condition_LogMatch) Reset() {
*x = AlertPolicy_Condition_LogMatch{}
if protoimpl.UnsafeEnabled {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AlertPolicy_Condition_LogMatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AlertPolicy_Condition_LogMatch) ProtoMessage() {}
func (x *AlertPolicy_Condition_LogMatch) ProtoReflect() protoreflect.Message {
mi := &file_google_monitoring_v3_alert_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AlertPolicy_Condition_LogMatch.ProtoReflect.Descriptor instead.