-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grace period for diff #70
Conversation
WIP because I'm running this functionality in testing at the moment |
2fb7c6f
to
5b022de
Compare
When a VRP disappears from one input, but it still present in the other input, an immediate difference between sources is created. This commits adds a grace period during which elements that disappear do not cause alerts (yet).
5b022de
to
6149d5f
Compare
This ran well overnight. I added some tests, which probably can improve in style 🙂 |
Thanks @ties |
@@ -55,6 +55,7 @@ var ( | |||
|
|||
UserAgent = flag.String("useragent", fmt.Sprintf("StayRTR-%v (+https://github.com/bgp/stayrtr)", AppVersion), "User-Agent header") | |||
DisableConditionalRequests = flag.Bool("disable.conditional.requests", false, "Disable conditional requests (using If-None-Match/If-Modified-Since headers)") | |||
GracePeriod = flag.Duration("grace.period", time.Minute*20, "Grace period during which objects removed from a source are not considered for the diff") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just skimming really and no expert in Golang either.
Is there a way to set this GracePeriod via configuration file?
It should work to set -grace.period as a commandline argument.
Twenty minutes may be short depending on your setup. Hoever, in practice it
will be until the next update after 20 minutes, which probably is better.
…On Tue, Jul 12, 2022, 22:22 Tony Tauber ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In cmd/rtrmon/rtrmon.go
<#70 (comment)>:
> @@ -55,6 +55,7 @@ var (
UserAgent = flag.String("useragent", fmt.Sprintf("StayRTR-%v (+https://github.com/bgp/stayrtr)", AppVersion), "User-Agent header")
DisableConditionalRequests = flag.Bool("disable.conditional.requests", false, "Disable conditional requests (using If-None-Match/If-Modified-Since headers)")
+ GracePeriod = flag.Duration("grace.period", time.Minute*20, "Grace period during which objects removed from a source are not considered for the diff")
I'm just skimming really and no expert in Golang either.
Is there a way to set this GracePeriod via configuration file?
—
Reply to this email directly, view it on GitHub
<#70 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABQTEXW3EG7JPBSCVPEDULVTXHWVANCNFSM53HPATQQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When a VRP disappears from one input it may not disappear from the other input at the same time. Because a VRP is not present in one input, that has been present in the other input for a long time, an alert may fire immediately if the other source does not get updated before that alert fires.
This commits adds a grace period during which elements that disappear from one source do not cause alerts (yet).