Error reading proc loadavg – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

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;

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?