Skip to content

Commit

Permalink
update/alert.v1: Add time based debouncing fields to Rule
Browse files Browse the repository at this point in the history
Added SuppressFor (Duration) field to the Rule struct
within the alert api. This field is used for
optional time based debouncing of a rule
and rate limiting.

Suppress For represents the amount of time after
being last triggered that a rule should be
prevented from triggering again.

Change-Id: I366090c7e2fd92d6887d8118682c1e59f54cc653
  • Loading branch information
indigo-bswrth committed Jun 18, 2024
1 parent d09e89a commit 86c68ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
5 changes: 5 additions & 0 deletions arista/alert.v1/alert-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
# New entries go on top.

Changes:
- date: 2024-06-12
description: Update Rule struct with debouncing field
version: 1.9.1
onprem: true
cvaas: true
- date: 2024-05-09
description: Update GetSome, SetSome, DeleteSome REST endpoints
version: 1.9.0
Expand Down
3 changes: 3 additions & 0 deletions arista/alert.v1/alert.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package arista.alert.v1;
option go_package = "github.com/aristanetworks/cloudvision-go/api/arista/alert.v1;alert";

import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

import "fmp/extensions.proto";
Expand Down Expand Up @@ -584,6 +585,8 @@ message Rule {
google.protobuf.BoolValue continue_checks = 3;
// comment is a comment to include that will be displayed in the alert
google.protobuf.StringValue comment = 4;
// suppress_for is a time duration that a rule will be debounced for after being called
google.protobuf.Duration suppress_for = 5;
}

// Matches is a set of restrictions that must be satisfied for a rule to be matched
Expand Down
30 changes: 4 additions & 26 deletions arista/alert.v1/services.gen.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1373,19 +1373,6 @@
},
"title": "Alert is the current status of the alert system"
},
"arista.alert.v1.AlertBatchedStreamResponse": {
"type": "object",
"properties": {
"responses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/arista.alert.v1.AlertStreamResponse"
},
"description": "Values are the values deemed relevant to the initiating request.\nThe length of this structure is guaranteed to be between (inclusive) 1 and \nmin(req.max_messages, INTERNAL_BATCH_LIMIT)."
}
}
},
"arista.alert.v1.AlertConfig": {
"type": "object",
"properties": {
Expand All @@ -1404,19 +1391,6 @@
},
"title": "AlertConfig is the configuration for sending alerts"
},
"arista.alert.v1.AlertConfigBatchedStreamResponse": {
"type": "object",
"properties": {
"responses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/arista.alert.v1.AlertConfigStreamResponse"
},
"description": "Values are the values deemed relevant to the initiating request.\nThe length of this structure is guaranteed to be between (inclusive) 1 and \nmin(req.max_messages, INTERNAL_BATCH_LIMIT)."
}
}
},
"arista.alert.v1.AlertConfigResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2534,6 +2508,10 @@
"comment": {
"type": "string",
"title": "comment is a comment to include that will be displayed in the alert"
},
"suppressFor": {
"type": "string",
"title": "suppress_for is a time duration that a rule will be debounced for after being called"
}
},
"title": "Rule is a rule to send to a certain broadcast group"
Expand Down

0 comments on commit 86c68ad

Please sign in to comment.