opsgenie/kubernetes-event-exporter

Some events are not watched

omauger opened this issue · 1 comments

Hi,

After test kubernetes-event-exporter since few weeks, some events are missing and some are never watched.
Some "BackOff" event are missing and this are never watched :

  • Secret Created
  • Pulling
  • Pulled
  • Scheduled
  • And on custom resources "Applications" and "AppProjects" from Argoproj.

I have troubleshoot the problem and I suspect the few lines with return before log of the watched events in file "kube/watcher.go. So I test with comment of these lines and all events not seen before are correctly watched and collected.

// It's probably an old event we are catching, it's not the best way but anyways if time.Since(event.LastTimestamp.Time) > time.Second*5 { return }

I don't really understand these lines ? I think it's just if event are already presents before event-exporter start and if they are already collected by a previous exporter ? Maybe 5 seconds it's just too short ?

I think this lines are the problem of several open issues like : #47 , #115

I test with 30seconds to replace 5 and many events are missed again (BackOff, ImagePullBackOff, FailedMount, RessourceUpdated...)
I see some events created directly with last seen 4min20, so I test with 300seconds and the events are correctly trapped.