Class DiskSpaceHealthIndicator

java.lang.Object
org.springframework.boot.health.contributor.AbstractHealthIndicator
org.springframework.boot.actuate.system.DiskSpaceHealthIndicator
All Implemented Interfaces:
org.springframework.boot.health.contributor.HealthContributor, org.springframework.boot.health.contributor.HealthIndicator

public class DiskSpaceHealthIndicator extends org.springframework.boot.health.contributor.AbstractHealthIndicator
A HealthIndicator that checks available disk space and reports a status of Status.DOWN when it drops below a configurable threshold.
Since:
2.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiskSpaceHealthIndicator(File path, org.springframework.util.unit.DataSize threshold)
    Create a new DiskSpaceHealthIndicator instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doHealthCheck(org.springframework.boot.health.contributor.Health.Builder builder)
     

    Methods inherited from class org.springframework.boot.health.contributor.AbstractHealthIndicator

    health

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.boot.health.contributor.HealthIndicator

    health
  • Constructor Details

    • DiskSpaceHealthIndicator

      public DiskSpaceHealthIndicator(File path, org.springframework.util.unit.DataSize threshold)
      Create a new DiskSpaceHealthIndicator instance.
      Parameters:
      path - the Path used to compute the available disk space
      threshold - the minimum disk space that should be available
  • Method Details

    • doHealthCheck

      protected void doHealthCheck(org.springframework.boot.health.contributor.Health.Builder builder) throws Exception
      Specified by:
      doHealthCheck in class org.springframework.boot.health.contributor.AbstractHealthIndicator
      Throws:
      Exception