# ----------------------------------------------------------------------------- # low disk space # checking the latest collected values # raise an alarm if the disk is low on # available disk space template: disk_space_usage on: disk.space calc: $used * 100 / ($avail + $used) every: 1m warn: $this > 80 crit: $this > 95 units: % info: current disk space usage to: sysadmin # ----------------------------------------------------------------------------- # disk fill rate # calculate the rate the disk fills # use as base, the available space change # during the last hour # this is just a calculation - it has no alarm # we will use it in the next template to find # the hours remaining template: disk_fill_rate on: disk.space lookup: min -10m at -50m unaligned of avail calc: ($this - $avail) / (($now - $after) / 3600) every: 1m units: GB/hour info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour # calculate the hours remaining # if the disk continues to fill # in this rate template: out_of_disk_space_time on: disk.space calc: $avail / $disk_fill_rate every: 10s warn: $this > 0 and $this < 8 crit: $this > 0 and $this < 2 units: hours info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last hour to: sysadmin # ----------------------------------------------------------------------------- # disk congestion # raise an alarm if the disk is congested # by calculating the average disk utilization # for the last 10 minutes template: 10min_disk_utilization on: disk.util lookup: average -10m unaligned every: 1m green: 90 red: 98 warn: $this > $green crit: $this > $red units: % info: the percentage of time the disk was busy, during the last 10 minutes to: sysadmin # raise an alarm if the disk backlog # is above 1000ms (1s) per second # for 10 minutes # (i.e. the disk cannot catch up) template: 10min_disk_backlog on: disk.backlog lookup: average -10m unaligned every: 1m green: 1000 red: 2000 warn: $this > $green crit: $this > $red units: ms info: average of the kernel estimated disk backlog, for the last 10 minutes to: sysadmin