github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v3/alerting_policy.proto (about) 1 syntax = "proto3"; 2 3 package ntt.monitoring.v3; 4 5 import "google/api/resource.proto"; 6 import "goten-sdk/types/meta.proto"; 7 8 option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/resources/v3/alerting_policy;alerting_policy"; 9 option java_multiple_files = true; 10 option java_outer_classname = "AlertingPolicyProto"; 11 option java_package = "com.ntt.monitoring.pb.v3"; 12 13 // AlertingPolicy Resource 14 message AlertingPolicy { 15 option (google.api.resource) = { 16 type : "monitoring.edgelq.com/AlertingPolicy" 17 pattern : "projects/{project}/regions/{region}/alertingPolicies/" 18 "{alerting_policy}" 19 }; 20 21 // Name of AlertingPolicy 22 // When creating a new instance, this field is optional and if not provided, 23 // it will be generated automatically. Last ID segment must conform to the 24 // following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9] 25 string name = 1; 26 27 goten.types.Meta metadata = 2; 28 29 // display name 30 string display_name = 3; 31 32 // Long description 33 string description = 4; 34 35 Documentation documentation = 5; 36 37 // Spec 38 Spec spec = 6; 39 40 State state = 7; 41 42 // Documentation 43 message Documentation { 44 // Documentation content 45 string content = 1; 46 47 // documentation mime type. Only `"text/markdown"` is supported. 48 string mime_type = 2; 49 } 50 51 message Spec { 52 // Whether policy is enabled and will evaluate any conditions 53 // Note: If any existing fired alerts are present, 54 // they will not be resolved automatically 55 // TODO: consider if they should? 56 bool enabled = 1; 57 58 // Condition Combiner when deciding if ANY (OR) or ALL (AND) conditions for 59 // given subset of resource labels must fire in order to trigger an alert 60 // TODO: Add support to AND 61 ConditionsCombiner condition_combiner = 2; 62 63 // Notification specification 64 Notification notification = 4; 65 66 // Notification specification for a given Policy 67 message Notification { 68 // Enabled flag determines whether any notifications will be sent 69 bool enabled = 1; 70 71 repeated string channels = 3; 72 73 reserved 2; 74 } 75 76 enum ConditionsCombiner { 77 OR = 0; 78 79 AND = 1; 80 } 81 } 82 83 message State { 84 // Number of ongoing alerts (incident has not ended) 85 int64 active_alerts_count = 1; 86 } 87 }