Class SentinelHealthIndicator
java.lang.Object
org.springframework.boot.actuate.health.AbstractHealthIndicator
com.alibaba.cloud.sentinel.endpoint.SentinelHealthIndicator
- All Implemented Interfaces:
org.springframework.boot.actuate.health.HealthContributor,org.springframework.boot.actuate.health.HealthIndicator
public class SentinelHealthIndicator
extends org.springframework.boot.actuate.health.AbstractHealthIndicator
A
HealthIndicator for Sentinel, which checks the status of Sentinel Dashboard
and DataSource.
Check the status of Sentinel Dashboard by sending a heartbeat message to it. If return
true, it's OK.
Check the status of Sentinel DataSource by calling loadConfig method of
AbstractDataSource. If no Exception thrown, it's OK.
If Dashboard and DataSource are both OK, the health status is UP.
Note: If Sentinel isn't enabled, the health status is up. If Sentinel Dashboard isn't configured, it's OK and mark the status of Dashboard with UNKNOWN. More informations are provided in details.
- Author:
- cdfive
-
Constructor Summary
ConstructorsConstructorDescriptionSentinelHealthIndicator(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory, SentinelProperties sentinelProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoHealthCheck(org.springframework.boot.actuate.health.Health.Builder builder) Methods inherited from class org.springframework.boot.actuate.health.AbstractHealthIndicator
healthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
SentinelHealthIndicator
public SentinelHealthIndicator(org.springframework.beans.factory.support.DefaultListableBeanFactory beanFactory, SentinelProperties sentinelProperties)
-
-
Method Details