-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for notification_center (#81)
* add support for notification_center * align to correct schema * add new schema for new notification event * remove logExample from any group * update version for supporting one destionation with two NotificationRouting * review by Zvika * reviewd by RLRL * final version
- Loading branch information
Showing
8 changed files
with
117 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
com/coralogixapis/alerts/v3/alert_def_type_definition/notification_destination.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
syntax = "proto3"; | ||
import "com/coralogixapis/alerts/v3/commons.proto"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
|
||
message NotificationDestination { | ||
string connector_id = 1; | ||
optional string preset_id = 2; | ||
NotifyOn notify_on = 3; | ||
NotificationRouting triggeredRoutingOverrides = 4; | ||
optional NotificationRouting resolvedRouteOverrides = 5; | ||
} | ||
|
||
message NotificationRouting { | ||
optional SourceOverrides config_overrides = 1; | ||
} | ||
|
||
message SourceOverrides { | ||
string output_schema_id = 1; | ||
repeated MessageConfigField message_config_fields = 2; | ||
repeated ConnectorConfigField connector_config_fields = 3; | ||
} | ||
|
||
message ConnectorConfigField { | ||
string field_name = 1; | ||
string template = 2; | ||
} | ||
|
||
message MessageConfigField { | ||
string field_name = 1; | ||
string template = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
syntax = "proto3"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
|
||
enum NotifyOn { | ||
NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED = 0; | ||
NOTIFY_ON_TRIGGERED_AND_RESOLVED = 1; | ||
} |
6 changes: 6 additions & 0 deletions
6
com/coralogixapis/alerts/v3/notification/logs_immediate_notification.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
message LogsImmediateNotification {} |
14 changes: 14 additions & 0 deletions
14
com/coralogixapis/alerts/v3/notification/logs_threshold_notification.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
syntax = "proto3"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
import "google/protobuf/wrappers.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "com/coralogixapis/alerts/v3/alert_def_type_definition/logs/threshold/logs_threshold_condition_type.proto"; | ||
|
||
message LogsThresholdNotification { | ||
google.protobuf.Timestamp from_timestamp = 1; | ||
google.protobuf.Timestamp to_timestamp = 2; | ||
google.protobuf.Int64Value count_result = 3; | ||
google.protobuf.BoolValue is_undetected_value = 4; | ||
LogsThresholdConditionType condition_type = 5; | ||
} |
17 changes: 17 additions & 0 deletions
17
com/coralogixapis/alerts/v3/notification/metric_threshold_notification.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
syntax = "proto3"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
import "google/protobuf/wrappers.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "com/coralogixapis/alerts/v3/alert_def_type_definition/metric/threshold/metric_threshold_condition_type.proto"; | ||
|
||
message MetricThresholdNotification { | ||
google.protobuf.DoubleValue pct_over_threshold = 1; | ||
google.protobuf.DoubleValue avg_value_over_threshold = 2; | ||
google.protobuf.DoubleValue min_value_over_threshold = 3; | ||
google.protobuf.DoubleValue max_value_over_threshold = 4; | ||
google.protobuf.BoolValue is_undetected_value = 5; | ||
google.protobuf.Timestamp from_timestamp = 6; | ||
google.protobuf.Timestamp to_timestamp = 7; | ||
MetricThresholdConditionType condition_type = 8; | ||
} |
36 changes: 36 additions & 0 deletions
36
com/coralogixapis/alerts/v3/notification/notification_event.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
syntax = "proto3"; | ||
|
||
package com.coralogixapis.alerts.v3; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
import "com/coralogixapis/alerts/v3/event/alert_event.proto"; | ||
import "com/coralogixapis/alerts/v3/alert_def_priority.proto"; | ||
import "com/coralogixapis/alerts/v3/notification/logs_immediate_notification.proto"; | ||
import "com/coralogixapis/alerts/v3/notification/logs_threshold_notification.proto"; | ||
import "com/coralogixapis/alerts/v3/notification/metric_threshold_notification.proto"; | ||
import "com/coralogixapis/alerts/v3/alert_def.proto"; | ||
|
||
message AlertNotificationEvent { | ||
google.protobuf.Timestamp timestamp = 1; | ||
google.protobuf.StringValue id = 2; | ||
AlertStatus status = 3; | ||
Attachments attachments = 4; | ||
repeated Group groups = 5; | ||
} | ||
|
||
message Group { | ||
AlertStatus status = 1; | ||
google.protobuf.BoolValue suppressed = 2; | ||
AlertDefPriority priority = 3; | ||
map<string, string> key_values = 4; | ||
oneof details { | ||
LogsImmediateNotification logs_immediate = 100; | ||
LogsThresholdNotification logs_threshold = 101; | ||
MetricThresholdNotification metric_threshold = 102; | ||
} | ||
} | ||
|
||
message Attachments { | ||
google.protobuf.StringValue logExample = 1; | ||
} |