From a26fc52181cf38d93ca77753391562ef92a747ce Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Tue, 25 Jul 2017 17:08:03 -0700 Subject: [PATCH] Fix panic in logparser if file cannot be opened (#3055) --- plugins/inputs/logparser/logparser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/logparser/logparser.go b/plugins/inputs/logparser/logparser.go index ea1e5d641..0c495f409 100644 --- a/plugins/inputs/logparser/logparser.go +++ b/plugins/inputs/logparser/logparser.go @@ -182,7 +182,10 @@ func (l *LogParserPlugin) tailNewfiles(fromBeginning bool) error { Location: &seek, MustExist: true, }) - l.acc.AddError(err) + if err != nil { + l.acc.AddError(err) + continue + } // create a goroutine for each "tailer" l.wg.Add(1)