In Helidon SE you can enable a health check for the disk space usage.
If the disk space usage is above a certain threshold then the health check will fail.
To enable the disk space health check you need to add the dependency io.helidon.health:helidon-health-checks to your pom.xml file.
The dependency contains three health checks: disk space usage, memory usage and dead lock detection.
To configure the disk space health check you need to set the configuration property server.features.observe.observers.health.helidon.health.diskSpace.thresholdPercent to the threshold percentage.
Or programmatically set the value in your application code.
The default value is 99.999, which means that in real life the health check will not fail.
You need to set a lower percentage in order to see the health check fail.
For example when you set the value to 95.0 then the health check will fail when the disk space usage is above 95% or less than 5% of the disk space is available.
You can also configure the path to check for disk space usage.
The default path is the current working directory, but it can be set to another path.
You need to set the configuration property server.features.observe.observers.health.helidon.health.diskSpace.path to change the path.