-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add option to skip older k8s events #29396
Add option to skip older k8s events #29396
Conversation
Signed-off-by: chrismark <[email protected]>
This pull request does not have a backport label. Could you fix it @ChrsMark? 🙏
NOTE: |
Pinging @elastic/integrations (Team:Integrations) |
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
This pull request is now in conflicts. Could you fix it? 🙏
|
Signed-off-by: chrismark <[email protected]>
@@ -87,6 +88,7 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) { | |||
dedotConfig: dedotConfig, | |||
watcher: watcher, | |||
watchOptions: watchOptions, | |||
skipOlder: true, |
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.
This value should come from the config like skipOlder: config.SkipOlder
.
Now it is hardcoded to true.
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.
🤦🏼♂️ you are right! Thanks for catching this!
Signed-off-by: chrismark <[email protected]>
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.
LGTM
Signed-off-by: chrismark <[email protected]>
(cherry picked from commit 9b893e8) # Conflicts: # metricbeat/module/kubernetes/event/config.go
* Add option to skip older k8s events (#29396) (cherry picked from commit 9b893e8) # Conflicts: # metricbeat/module/kubernetes/event/config.go * Update CHANGELOG.next.asciidoc * Update config.go Co-authored-by: Chris Mark <[email protected]>
What does this PR do?
This PR adds option to skip older k8s events in
event
metricset of kubernetes module.Why is it important?
There might be cases that
LastTimestamp
beats/metricbeat/module/kubernetes/event/event.go
Lines 107 to 112 in a350c32
LastTimestamp
is not set.Related to #28923