@Override
    protected void doHealthCheck(final Health.Builder builder) {
        val systemLoad = getMetricsFor("system.load.average.1m");

        builder
            .withDetail("systemUsage", getMetricsFor("system.cpu.usage"))
            .withDetail("systemLoad", getMetricsFor("system.load.average.1m"))
            .withDetail("processUsage", getMetricsFor("process.cpu.usage"))
            .withDetail("jvmUsed", getMetricsFor("jvm.memory.used"))
            .withDetail("jvmCommitted", getMetricsFor("jvm.memory.committed"))
            .withDetail("heapUsed", getMetricsFor("jvm.memory.used", List.of("area:heap")))
            .withDetail("heapCommitted", getMetricsFor("jvm.memory.committed", List.of("area:heap")))
            .withDetail("uptime", getMetricsFor("process.uptime"))
            .withDetail("requests", getMetricsFor("http.server.requests"))
            .withDetail("maxRequest", getMetricsFor("http.server.requests", 2));

        if (systemLoad > threshold) {
            builder.status("WARN");
        } else {
            builder.status(Status.UP);
        }
    }
Monitors JVM system load and memory.

@author Travis Schmidt
@since 6.1.0
core/cas-server-core-monitor/src/main/java/org/apereo/cas/monitor/SystemMonitorHealthIndicator.java