Java Spring Boot Actuator Metrics system load average returning -1
<p>I am a new user to Spring Boot Actuator Metrics, I need to determine the CPU utilization of the system. The /metrics url does give me rest of the details, however the systemload.average returns -1 (if load average is not available -1 is returned). Could you let me know where I went wrong and how do I correct it?
I am using maven and Eclipse IDE (Mars). I am accessing metric details on localhost itself. the url is http://localhost:8080/details/metrics (details used for context path)</p>
<p>Here is my code:
Application.java file
package spring.boot.admin.actuator;</p>
<pre><code>import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;

@EnableAutoConfiguration
@ComponentScan
@PropertySource(value = &quot;classpath:application.properties&quot;)
public class Application{

public static void main(final String[] args) {
    SpringApplication.run(Application.class, args);
}
}
</code></pre>
<p>POM File

4.0.0</p>
<pre><code>  &lt;groupId&gt;spring.boot.admin&lt;/groupId&gt;
  &lt;artifactId&gt;actuator&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;

  &lt;name&gt;actuator&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;

  &lt;properties&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;

&lt;parent&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
&lt;version&gt;1.3.7.RELEASE&lt;/version&gt;
&lt;/parent&gt;
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    
    &lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
&lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
&lt;/dependency&gt;
    
  &lt;/dependencies&gt;
&lt;/project&gt;

**application.properties file**

management.port=8080
management.context-path=/details
management.security.enabled=true

endpoints.health.enabled=false

security.basic.enabled=true
security.user.name=admin
security.user.password=admin

endpoints.health.id=health
endpoints.health.sensitive=true
endpoints.health.enabled=true

endpoints.metrics.id=metrics
endpoints.metrics.sensitive=true
endpoints.metrics.enabled=true

endpoints.server.id=server
endpoints.server.sensitive=false
endpoints.server.enabled=true

endpoints.info.id=info
endpoints.info.sensitive=false
endpoints.info.enabled=true
info.app.name=Spring Actuator Example
info.app.description=Spring Actuator Working Examples
info.app.version=0.0.1-SNAPSHOT
management.security.enabled=true
</code></pre>
<p><a href="https://i.stack.imgur.com/PWg47.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PWg47.jpg" alt="enter image description here" /></a></p>