Class DiskSpaceHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.AbstractHealthIndicator
- org.springframework.boot.actuate.health.DiskSpaceHealthIndicator
- All Implemented Interfaces:
HealthIndicator
public class DiskSpaceHealthIndicator extends AbstractHealthIndicator
AHealthIndicator
that checks available disk space and reports a status ofStatus.DOWN
when it drops below a configurable threshold.- Since:
- 1.2.0
Constructor Summary
Constructors Constructor Description DiskSpaceHealthIndicator(DiskSpaceHealthIndicatorProperties properties)
Create a newDiskSpaceHealthIndicator
.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doHealthCheck(Health.Builder builder)
Actual health check logic.Methods inherited from class org.springframework.boot.actuate.health.AbstractHealthIndicator
health
Constructor Detail
DiskSpaceHealthIndicator
public DiskSpaceHealthIndicator(DiskSpaceHealthIndicatorProperties properties)
Create a newDiskSpaceHealthIndicator
.- Parameters:
properties
- the disk space properties
Method Detail
doHealthCheck
protected void doHealthCheck(Health.Builder builder) throws Exception
Description copied from class:AbstractHealthIndicator
Actual health check logic.- Specified by:
doHealthCheck
in classAbstractHealthIndicator
- Parameters:
builder
- theHealth.Builder
to report health status and details- Throws:
Exception
- anyException
that should create aStatus.DOWN
system status.