@ConditionalOnMissingBean(name = "sessionHealthIndicator")
        @Bean
        @ConditionalOnEnabledHealthIndicator("sessionHealthIndicator")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public HealthIndicator sessionHealthIndicator(
            @Qualifier(TicketRegistry.BEAN_NAME)
            final ObjectProvider<TicketRegistry> ticketRegistry,
            final CasConfigurationProperties casProperties) {
            val warnSt = casProperties.getMonitor().getSt().getWarn();
            val warnTgt = casProperties.getMonitor().getTgt().getWarn();
            if (warnSt.getThreshold() > 0 && warnTgt.getThreshold() > 0) {
                LOGGER.debug("Configured session monitor with service ticket threshold [{}] and session threshold [{}]",
                    warnSt.getThreshold(), warnTgt.getThreshold());
                return new TicketRegistryHealthIndicator(ticketRegistry, warnSt.getThreshold(), warnTgt.getThreshold());
            }
            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