Class SystemdProperties.ActuatorHealth
java.lang.Object
com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.Toggle
com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.ActuatorHealth
- Enclosing class:
- SystemdProperties
The
ActuatorHealthStatusProvider, which provides the application health when using Spring Boot Actuator.-
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetGroup()Check the name of the Spring Boot Actuator health group whose members are taken into account.@Nullable DurationCheck the delay before suppressing the watchdog heartbeat while the application is unhealthy.Check the status codes fromStatusto consider as unhealthy.booleanisHealth()Check if the watchdog heartbeat is suppressed while the application is unhealthy.voidSet the name of the Spring Boot Actuator health group whose members are shown in the systemd status and taken into account for the health signal.voidsetHealth(boolean health) Enable or disable suppressing the watchdog heartbeat while the application is unhealthy.voidsetUnhealthyDelay(@Nullable Duration unhealthyDelay) Set the delay before suppressing the watchdog heartbeat while the application is unhealthy.voidsetUnhealthyStatusCodes(List<String> unhealthyStatusCodes) Set the status codes fromStatusto consider as unhealthy.Methods inherited from class com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.Toggle
isEnabled, setEnabled
-
Method Details
-
isHealth
public boolean isHealth()Check if the watchdog heartbeat is suppressed while the application is unhealthy.- Returns:
trueif the application health is signalled to the watchdog
-
setHealth
public void setHealth(boolean health) Enable or disable suppressing the watchdog heartbeat while the application is unhealthy.- Parameters:
health-trueto signal the application health to the watchdog
-
getUnhealthyStatusCodes
Check the status codes fromStatusto consider as unhealthy.- Returns:
- the status codes from
Statusto consider as unhealthy - See Also:
-
setUnhealthyStatusCodes
Set the status codes fromStatusto consider as unhealthy. If omittedStatus.DOWNis used.- Parameters:
unhealthyStatusCodes- the status codes fromStatusto consider as unhealthy
-
getGroup
Check the name of the Spring Boot Actuator health group whose members are taken into account.- Returns:
- the name of the health group, or
nullto take all the health contributors into account - See Also:
-
setGroup
Set the name of the Spring Boot Actuator health group whose members are shown in the systemd status and taken into account for the health signal.- Parameters:
group- the name of the health group, ornullto take all the health contributors into account
-
getUnhealthyDelay
Check the delay before suppressing the watchdog heartbeat while the application is unhealthy.- Returns:
- the delay, or
nullif there is no delay - See Also:
-
setUnhealthyDelay
Set the delay before suppressing the watchdog heartbeat while the application is unhealthy.- Parameters:
unhealthyDelay- the delay, ornullto disable the delay
-