diff --git a/plugins/inputs/lustre2/lustre2.go b/plugins/inputs/lustre2/lustre2.go index ef570f2c0..a9c51de8f 100644 --- a/plugins/inputs/lustre2/lustre2.go +++ b/plugins/inputs/lustre2/lustre2.go @@ -242,6 +242,11 @@ func (l *Lustre2) getLustreProcStats(fileglob string, wantedFields []*mapping) e if err != nil { return err } + if len(wholeFile) == 0 { + l.Log.Debugf("Skipping empty file %s", file) + continue + } + jobs := strings.Split(string(wholeFile), "- ") for _, job := range jobs { lines := strings.Split(job, "\n")