Skip journald bad message. (#2928)

Unfortunatelly I can't show the message itself without forking the library
we are using.

Fixes #2812.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
pull/2940/head
Cyril Tovena 5 years ago committed by GitHub
parent 78bb4bcef7
commit 58f8117618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      pkg/promtail/targets/journal/journaltarget.go

@ -180,10 +180,15 @@ func journalTargetWithReader(
}
go func() {
for {
err := t.r.Follow(until, ioutil.Discard)
if err != nil && err != sdjournal.ErrExpired {
if err != nil {
if err == sdjournal.ErrExpired || err == io.EOF {
return
}
level.Error(t.logger).Log("msg", "received error during sdjournal follow", "err", err.Error())
}
}
}()
return t, nil

Loading…
Cancel
Save