Briefly, this error occurs when Elasticsearch is unable to read the system’s load average from the /proc/loadavg file. This usually happens due to insufficient permissions or the file not being available, especially on non-Linux systems. To resolve this issue, you can either grant the necessary permissions to Elasticsearch to read the file, or disable the system call that reads the load average in the Elasticsearch settings if you’re on a non-Linux system.
This guide will help you check for common problems that cause the log ” error reading /proc/loadavg ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: monitor.
Log Context
Log “error reading /proc/loadavg” classname is OsProbe.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
assert procLoadAvg.matches("(\d+\.\d+\s+){3}\d+/\d+\s+\d+"); final String[] fields = procLoadAvg.split("\s+"); return new double[] { Double.parseDouble(fields[0]); Double.parseDouble(fields[1]); Double.parseDouble(fields[2]) }; } catch (final IOException e) { if (logger.isDebugEnabled()) { logger.debug("error reading /proc/loadavg"; e); } return null; } } else { assert Constants.MAC_OS_X;