-
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
[Metricbeat] module:kubernetes / metricset:event fails to gather FailedScheduling events on k8s 1.20.5 #28923
Comments
We are also affected. |
I have met this issue on my cluster too.
|
The same issue. |
Pinging @elastic/integrations (Team:Integrations) |
I have the same issue |
Thanks for reporting this @MnrGreg and folks. It looks like the API's types have been changed. We are looking into this already :). |
It seems that the API's types have been changed and we need to further investigate this so as to support newer and older versions at the same time. For sure we need to unblock the filtering to be dropping all events and in this regard I've opened a PR to introduce a new setting |
An update on this. Based on kubernetes/kubernetes#90482 (comment) + manual testing + provided sample events it looks like In addition, there is also the new API and plans for migrating to this (link) so in the long term when all components will be migrated, and API server mostly, we will be able/should to switch into using the new API's types. Based on testing until version 1.23.0 (kind) I see that the old API is still used:
Same results when testing on GKE (1.21.1). In this regard I would go with a solution of updating our implementation to tolerate with events that do not have value for the |
The approach I was thinking is that after the introduction of |
I think that the default should remain as |
Ok, so after thinking of this with @MichaelKatsoulis the way to go is to change the condition to also take The change needed at
m.skipOlder && ( kubernetes.Time(&eve.LastTimestamp).Before(now) || kubernetes.Time(&eve.EventTime).Before(now)
|
Hi @MnrGreg, since the temp workaround has been merged and scheduled for |
Closing for now. We can re-open if things don't work as expected. |
When upgrading from kubernetes 1.19.1 to 1.20.5, metricset:event no longer gathers
.reason:FailedScheduling
k8s events. Might it be related to the k8s event structure changing?See 1.19.1 event json below:
compare with similar event in 1.20.5 below:
Note the differences:
Is
.lastTimestamp: null
perhaps causing the event watch time comparison to fail? See here:beats/metricbeat/module/kubernetes/event/event.go
Lines 107 to 112 in a350c32
Running metricbeat in debug mode with '-d "*' does not surface any errors. The events seem to be silently dropped.
Related issue:
kubernetes/kubernetes#90482
The text was updated successfully, but these errors were encountered: