github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v3/alert.proto (about) 1 syntax = "proto3"; 2 3 package ntt.monitoring.v3; 4 5 import "edgelq-sdk/monitoring/proto/v3/common.proto"; 6 import "google/api/resource.proto"; 7 import "google/protobuf/duration.proto"; 8 import "google/protobuf/timestamp.proto"; 9 import "goten-sdk/types/meta.proto"; 10 11 option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/resources/v3/alert;alert"; 12 option java_multiple_files = true; 13 option java_outer_classname = "AlertProto"; 14 option java_package = "com.ntt.monitoring.pb.v3"; 15 16 // Alert Resource 17 message Alert { 18 option (google.api.resource) = { 19 type : "monitoring.edgelq.com/Alert" 20 pattern : "projects/{project}/alertingPolicies/{alerting_policy}/regions/" 21 "{region}/alertingConditions/{alerting_condition}/alerts/{alert}" 22 }; 23 24 // Name of Alert 25 // When creating a new instance, this field is optional and if not provided, 26 // it will be generated automatically. Last ID segment must conform to the 27 // following regex: [a-zA-Z0-9_.:-]{1,128} 28 string name = 1; 29 30 goten.types.Meta metadata = 2; 31 32 string display_name = 3; 33 34 Info info = 4; 35 36 // State of alert 37 State state = 5; 38 39 message Info { 40 // TimeSerie labels that violated condition 41 TimeSerie time_serie = 1; 42 43 // observed time series values during alert creation 44 ObservedValues observed_values = 2; 45 46 message TimeSerie { 47 bytes key = 101; 48 49 Metric metric = 1; 50 51 MonitoredResource monitored_resource = 2; 52 } 53 54 message ObservedValues { 55 // oneof 56 double example_value = 1; 57 58 map<string, double> per_metric = 2; 59 } 60 } 61 62 message State { 63 bool is_firing = 2; 64 65 bool is_acknowledged = 3; 66 67 bool is_silenced = 4; 68 69 // describes in terms of time series when alert began and ended (resolved). 70 // uses Time Series derived timestamps, rather than real-time. 71 // use meta.create_time to get creation date. 72 TimeRange lifetime = 7; 73 74 // This alert needs to be notified 75 bool needs_notification = 8; 76 77 // Notification resource is generated for this alert 78 bool notification_created = 9; 79 80 // Alert has ended and any needed notifications are processed 81 bool lifecycle_completed = 10; 82 83 // oneof: 84 message Threshold { double observed_value = 1; } 85 86 message CombineThreshold { 87 message PerMetric { map<string, double> observed_values = 2; } 88 } 89 } 90 }