diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index cbfb0032e5c..26b02a06d24 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -145,6 +145,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix CPU usage metrics on VMs with dynamic CPU config {pull}23154[23154] - Fix panic due to unhandled DeletedFinalStateUnknown in k8s OnDelete {pull}23419[23419] - Fix error loop with runaway CPU use when the Kafka output encounters some connection errors {pull}23484[23484] +- Fix issue discovering docker containers and metadata after reconnections {pull}24318[24318] *Auditbeat* diff --git a/libbeat/common/docker/watcher.go b/libbeat/common/docker/watcher.go index 4145423209a..5b490b1e13e 100644 --- a/libbeat/common/docker/watcher.go +++ b/libbeat/common/docker/watcher.go @@ -276,7 +276,11 @@ func (w *watcher) watch() { select { case event := <-events: w.log.Debugf("Got a new docker event: %v", event) - lastValidTimestamp = time.Unix(event.Time, event.TimeNano) + if event.TimeNano > 0 { + lastValidTimestamp = time.Unix(0, event.TimeNano) + } else { + lastValidTimestamp = time.Unix(event.Time, 0) + } lastReceivedEventTime = w.clock.Now() switch event.Action {