- All Implemented Interfaces:
HealthCheck
By default, this health check has a threshold of 100%, meaning that it will never fail the threshold check.
Also, by default, it will check the root path /
. These defaults can be modified using the
"helidon.health.diskSpace.path" property (default "."), and the "helidon.health.diskSpace.thresholdPercent"
property (default 99.999, virtually 100). The threshold should be set to a percent, such as 50 for 50% or
99 for 99%. If disk usage
exceeds this threshold, then the health check will fail.
Unless ephemeral disk space is being used, it is often not sufficient to simply restart a server in the event that that health check fails.
This health check is automatically created and registered through CDI.
This health check can be referred to in properties as diskSpace
. So for example, to exclude this
health check from being exposed, use health.exclude: diskSpace
.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Full configuration key for path, when configured through MicroProfile config.static final String
Full configuration key for threshold percent, when configured through Microprofile config.static final String
Default path on the file system the health check will be executed for.static final double
Default threshold percent, when this check starts reportingHealthCheckResponse.Status.DOWN
. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiskSpaceHealthCheck.Builder
builder()
A new fluent API builder to configure this health check.call()
static DiskSpaceHealthCheck
create()
Create a new disk space health check to use, using defaults for all configurable values.
-
Field Details
-
DEFAULT_PATH
Default path on the file system the health check will be executed for. If you need to check a different path (e.g. application runtime disks are not mounted the same directory as application path), useDiskSpaceHealthCheck.Builder.path(java.nio.file.Path)
. When running within a MicroProfile server, you can configure path using a configuration key "helidon.health.diskSpace.path" Defaults to "."- See Also:
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLDDefault threshold percent, when this check starts reportingHealthCheckResponse.Status.DOWN
.- See Also:
-
CONFIG_KEY_PATH
Full configuration key for path, when configured through MicroProfile config.- See Also:
-
CONFIG_KEY_THRESHOLD_PERCENT
Full configuration key for threshold percent, when configured through Microprofile config.- See Also:
-
-
Method Details
-
builder
A new fluent API builder to configure this health check.- Returns:
- builder
-
create
Create a new disk space health check to use, using defaults for all configurable values.- Returns:
- a new health check to register with
HealthSupport.Builder.addLiveness(org.eclipse.microprofile.health.HealthCheck...)
- See Also:
-
call
- Specified by:
call
in interfaceHealthCheck
-