@ConditionalOnMissingBean(name = "memoryHealthIndicator")
        @Bean
        @ConditionalOnEnabledHealthIndicator("memoryHealthIndicator")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public HealthIndicator memoryHealthIndicator(
            final CasConfigurationProperties casProperties) {
            val freeMemThreshold = casProperties.getMonitor().getMemory().getFreeMemThreshold();
            if (freeMemThreshold > 0) {
                LOGGER.debug("Configured memory monitor with free-memory threshold [{}]", freeMemThreshold);
                return new MemoryMonitorHealthIndicator(freeMemThreshold);
            }
            return () -> Health.up().build();
        }
This is {@link CasCoreMonitorAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-monitor/src/main/java/org/apereo/cas/config/CasCoreMonitorAutoConfiguration.java