Class DiskSpaceHealthCheck

java.lang.Object
io.helidon.health.checks.DiskSpaceHealthCheck
All Implemented Interfaces:
HealthCheck

public class DiskSpaceHealthCheck extends Object implements HealthCheck
A health check that verifies whether the server is running out of disk space. This health check will check whether the usage of the disk associated with a specific path exceeds a given threshold. If it does, then the health check will fail.

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 helidon.health.exclude: diskSpace.