private double getMetricsFor(final String key, final List<String> tag, final int measure) {
        return Optional.ofNullable(metrics.getIfAvailable())
            .map(endpoint -> {
                val metric = endpoint.metric(key, tag);
                val measures = Optional.ofNullable(metric).map(MetricsEndpoint.MetricDescriptor::getMeasurements).orElse(null);
                return measures != null ? measures.get(measure).getValue() : 0;
            })
            .orElse(0.0D);
    }
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