github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v3/notification.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 "goten-sdk/types/meta.proto"; 8 9 option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/resources/v3/notification;notification"; 10 option java_multiple_files = true; 11 option java_outer_classname = "NotificationProto"; 12 option java_package = "com.ntt.monitoring.pb.v3"; 13 14 // Notification Resource 15 message Notification { 16 option (google.api.resource) = { 17 type : "monitoring.edgelq.com/Notification" 18 pattern : "projects/{project}/regions/{region}/alertingPolicies/" 19 "{alerting_policy}/notifications/{notification}" 20 }; 21 22 // Name of Notification 23 // When creating a new instance, this field is optional and if not provided, 24 // it will be generated automatically. Last ID segment must conform to the 25 // following regex: [a-zA-Z0-9_.:-]{1,128} 26 string name = 1; 27 28 goten.types.Meta metadata = 2; 29 30 // Reference to alerting policy that this notification is for 31 string alerting_policy = 3; 32 33 // References to alerts that are part of this notification 34 repeated string alerts = 4; 35 36 State state = 6; 37 38 message State { 39 bool is_resolved = 1; 40 41 // Notification state 42 repeated NotificationState notification_state = 2; 43 44 // Internal state to keep track of whether any notification sends needs to 45 // be retried for new incident 46 bool incident_notify_attempts_done = 3; 47 48 // Internal state to keep track of whether any notification sends needs to 49 // be retried for resolution 50 bool resolution_notify_attempts_done = 4; 51 52 // Time range for which alerts for the policy are clubbed together 53 TimeRange alerts_lifetime = 5; 54 55 repeated NotificationState resolution_notification_state = 6; 56 57 // Alert has ended and any needed notifications are processed 58 bool lifecycle_completed = 7; 59 60 message NotificationState { 61 // Notification channel name 62 string notification_channel = 1; 63 64 Status status = 2; 65 66 // Error message if status is FAILED 67 string error = 3; 68 69 // Provider specific data. Allows tracking ids of notifications sent to 70 // specific channels. 71 ProviderData provider_data = 4; 72 73 int64 notify_attempts = 5; 74 75 // Provider specific data 76 message ProviderData { 77 Slack slack = 3; 78 79 PagerDuty pager_duty = 4; 80 81 // Slack 82 message Slack { string ts = 1; } 83 84 // Pager Duty 85 message PagerDuty { string incident_key = 1; } 86 } 87 88 enum Status { 89 UNKNOWN = 0; 90 91 PENDING = 1; 92 93 FAILED = 2; 94 95 SUPPRESSED = 3; 96 97 SENT = 4; 98 99 // Status types that can be used by webhook integrated providers, like 100 // PagerDuty. 101 DELIVERED = 5; 102 103 ACKNOWLEDGED = 6; 104 105 UNACKNOWLEDGED = 7; 106 } 107 } 108 } 109 }