Class DiskSpaceMonitor

All Implemented Interfaces:
Monitor<HealthcheckStatus>, Runnable

public class DiskSpaceMonitor extends CountMonitor
A simple monitor to keep track of the disk space in a partition
  • Constructor Details

    • DiskSpaceMonitor

      public DiskSpaceMonitor(String partition, Integer countThreshhold, TimeEntity timeEntity)
      Parameters:
      partition - partition to be monitored
      countThreshhold - maximum freespace of partition, below which, the monitor will mark itself as unhealthy
      timeEntity - how often the CountMonitor.monitor() check needs to be executed
    • DiskSpaceMonitor

      public DiskSpaceMonitor(String partition, String name, Integer threshhold, TimeEntity timeEntity)
      Parameters:
      partition - partition to be monitored
      name - name of monitor
      threshhold - maximum freespace of partition, below which, the monitor will mark itself as unhealthy
      timeEntity - how often the CountMonitor.monitor() check needs to be executed
  • Method Details

    • getCount

      public Number getCount()
      Specified by:
      getCount in class CountMonitor
      Returns:
      the current value of the entity being monitored