org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator Java Examples

The following examples show how to use org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NacosDiscoveryEndpointAutoConfiguration.java    From spring-cloud-alibaba with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnEnabledHealthIndicator("nacos-discovery")
public HealthIndicator nacosDiscoveryHealthIndicator(
		NacosDiscoveryProperties nacosDiscoveryProperties) {
	return new NacosDiscoveryHealthIndicator(
			nacosDiscoveryProperties.namingServiceInstance());
}
 
Example #2
Source File: SentinelEndpointAutoConfiguration.java    From spring-cloud-alibaba with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("sentinel")
public SentinelHealthIndicator sentinelHealthIndicator(
		DefaultListableBeanFactory beanFactory,
		SentinelProperties sentinelProperties) {
	return new SentinelHealthIndicator(beanFactory, sentinelProperties);
}
 
Example #3
Source File: ZookeeperDiscoveryAutoConfiguration.java    From spring-cloud-zookeeper with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("zookeeper")
public ZookeeperDiscoveryHealthIndicator zookeeperDiscoveryHealthIndicator(
		CuratorFramework curatorFramework,
		ServiceDiscovery<ZookeeperInstance> serviceDiscovery,
		ZookeeperDiscoveryProperties properties) {
	return new ZookeeperDiscoveryHealthIndicator(curatorFramework,
			serviceDiscovery, zookeeperDependencies, properties);
}
 
Example #4
Source File: ZookeeperHealthAutoConfiguration.java    From spring-cloud-zookeeper with Apache License 2.0 5 votes vote down vote up
/**
 * If there is an active curator, if the zookeeper health endpoint is enabled and if a
 * health indicator hasn't already been added by a user add one.
 * @param curator The curator connection to zookeeper to use
 * @return An instance of {@link ZookeeperHealthIndicator} to add to actuator health
 * report
 */
@Bean
@ConditionalOnMissingBean(ZookeeperHealthIndicator.class)
@ConditionalOnBean(CuratorFramework.class)
@ConditionalOnEnabledHealthIndicator("zookeeper")
public ZookeeperHealthIndicator zookeeperHealthIndicator(CuratorFramework curator) {
	return new ZookeeperHealthIndicator(curator);
}
 
Example #5
Source File: RefreshEndpointAutoConfiguration.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("refresh")
RefreshScopeHealthIndicator refreshScopeHealthIndicator(
		ObjectProvider<RefreshScope> scope,
		ConfigurationPropertiesRebinder rebinder) {
	return new RefreshScopeHealthIndicator(scope, rebinder);
}
 
Example #6
Source File: EurekaClientAutoConfiguration.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("eureka")
public EurekaHealthIndicator eurekaHealthIndicator(EurekaClient eurekaClient,
		EurekaInstanceConfig instanceConfig, EurekaClientConfig clientConfig) {
	return new EurekaHealthIndicator(eurekaClient, instanceConfig, clientConfig);
}
 
Example #7
Source File: SidecarAutoConfiguration.java    From spring-cloud-alibaba with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnEnabledHealthIndicator("sidecar")
public SidecarHealthIndicator sidecarHealthIndicator(
		SidecarProperties sidecarProperties, RestTemplate restTemplate) {
	return new SidecarHealthIndicator(sidecarProperties, restTemplate);
}
 
Example #8
Source File: RocketMQBinderHealthIndicatorAutoConfiguration.java    From spring-cloud-alibaba with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnEnabledHealthIndicator("rocketmq")
public RocketMQBinderHealthIndicator rocketBinderHealthIndicator() {
	return new RocketMQBinderHealthIndicator();
}
 
Example #9
Source File: NacosConfigEndpointAutoConfiguration.java    From spring-cloud-alibaba with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("nacos-config")
public NacosConfigHealthIndicator nacosConfigHealthIndicator() {
	return new NacosConfigHealthIndicator(nacosConfigManager.getConfigService());
}
 
Example #10
Source File: KubernetesAutoConfiguration.java    From spring-cloud-kubernetes with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnEnabledHealthIndicator("kubernetes")
public KubernetesHealthIndicator kubernetesHealthIndicator(PodUtils podUtils) {
	return new KubernetesHealthIndicator(podUtils);
}
 
Example #11
Source File: ConsulAutoConfiguration.java    From spring-cloud-consul with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledHealthIndicator("consul")
public ConsulHealthIndicator consulHealthIndicator(ConsulClient consulClient) {
	return new ConsulHealthIndicator(consulClient);
}