@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnEnabledHealthIndicator("mongoHealthIndicator")
    @ConditionalOnMissingBean(name = "mongoHealthIndicator")
    public HealthIndicator mongoHealthIndicator(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("mongoHealthIndicatorTemplate")
        final BeanContainer<CasMongoOperations> mongoHealthIndicatorTemplate) {
        val warn = casProperties.getMonitor().getWarn();
        val results = mongoHealthIndicatorTemplate.toList()
            .stream()
            .map(template -> new MongoDbHealthIndicator(template,
                warn.getEvictionThreshold(), warn.getThreshold()))
            .collect(Collectors.toList());
        return new CompositeHealthIndicator(results);
    }
This is {@link CasMongoDbMonitoringAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-mongo-monitor/src/main/java/org/apereo/cas/config/CasMongoDbMonitoringAutoConfiguration.java