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 Long
Check the delay reporting unhealthy status to systemd watchdog.Check the status codes fromStatus
to consider as unhealthy.boolean
Check if the integration between Spring Boot Actuator health status and systemd watchdog is enabled.void
setEnabled
(boolean enabled) Enable integration between Spring Boot Actuator health status and systemd watchdog.void
setUnhealthyPendingPeriodMs
(@Nullable Long unhealthyPendingPeriodMs) Set the delay reporting unhealthy status to systemd watchdog.void
setUnhealthyStatusCodes
(@NotNull List<String> unhealthyStatusCodes) Set the status codes fromStatus
to 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:
true
if 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
-true
to enable the integration between Spring Boot Actuator health status and systemd watchdog
-
getUnhealthyStatusCodes
Check the status codes fromStatus
to consider as unhealthy.- Returns:
- the status codes from
Status
to consider as unhealthy - See Also:
-
setUnhealthyStatusCodes
Set the status codes fromStatus
to consider as unhealthy. If omittedStatus.DOWN
is used.- Parameters:
unhealthyStatusCodes
- the status codes fromStatus
to 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 benull
to disable the delay.- Parameters:
unhealthyPendingPeriodMs
- the delay reporting unhealthy status to systemd watchdog
-