Package com.github.jpmsilva.jsystemd
Class SystemdHealthProviderProperties
java.lang.Object
com.github.jpmsilva.jsystemd.SystemdHealthProviderProperties
@ConfigurationProperties(prefix="systemd.health-provider")
public class SystemdHealthProviderProperties
extends Object
Properties class for systemd integration when using Spring Boot Actuator.
- Author:
- Christian Lorenz
-
Method Summary
Modifier and TypeMethodDescription@Nullable LongCheck the delay reporting unhealthy status to systemd watchdog.Check the status codes fromStatusto consider as unhealthy.booleanCheck if the integration between Spring Boot Actuator health status and systemd watchdog is enabled.voidsetEnabled(boolean enabled) Enable integration between Spring Boot Actuator health status and systemd watchdog.voidsetUnhealthyPendingPeriodMs(@Nullable Long unhealthyPendingPeriodMs) Set the delay reporting unhealthy status to systemd watchdog.voidsetUnhealthyStatusCodes(@NotNull List<String> unhealthyStatusCodes) Set the status codes fromStatusto consider as unhealthy.
-
Method Details
-
isEnabled
public boolean isEnabled()Check if the integration between Spring Boot Actuator health status and systemd watchdog is enabled.- Returns:
trueif the integration between Spring Boot Actuator health status and systemd watchdog is enabled
-
setEnabled
public void setEnabled(boolean enabled) Enable integration between Spring Boot Actuator health status and systemd watchdog.- Parameters:
enabled-trueto enable the integration between Spring Boot Actuator health status and systemd 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
-
getUnhealthyPendingPeriodMs
Check the delay reporting unhealthy status to systemd watchdog.- Returns:
- the delay reporting unhealthy status to systemd watchdog
- See Also:
-
setUnhealthyPendingPeriodMs
Set the delay reporting unhealthy status to systemd watchdog. This parameter is provided in milliseconds, and may benullto disable the delay.- Parameters:
unhealthyPendingPeriodMs- the delay reporting unhealthy status to systemd watchdog
-