diff --git a/collector/meminfo_linux.go b/collector/meminfo_linux.go index 9aac018d94..c5de4329b3 100644 --- a/collector/meminfo_linux.go +++ b/collector/meminfo_linux.go @@ -45,6 +45,10 @@ func parseMemInfo(r io.Reader) (map[string]float64, error) { for scanner.Scan() { line := scanner.Text() parts := strings.Fields(line) + // Workaround for empty lines occasionally occur in CentOS 6.2 kernel 3.10.90. + if len(parts) == 0 { + continue + } fv, err := strconv.ParseFloat(parts[1], 64) if err != nil { return nil, fmt.Errorf("invalid value in meminfo: %s", err)