1 # -----------------------------------------------------------------------------
2 # make sure we collect values for each disk
5 template: disk_space_last_collected_secs
8 calc: $now - $last_collected_t
11 warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
12 crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
13 delay: down 5m multiplier 1.5 max 1h
14 info: number of seconds since the last successful data collection of the mount point
18 template: disk_last_collected_secs
21 calc: $now - $last_collected_t
24 warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
25 crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
26 delay: down 5m multiplier 1.5 max 1h
27 info: number of seconds since the last successful data collection of the block device
31 # -----------------------------------------------------------------------------
34 # checking the latest collected values
35 # raise an alarm if the disk is low on
36 # available disk space
38 template: disk_space_usage
41 calc: $used * 100 / ($avail + $used)
44 warn: $this > (($status >= $WARNING ) ? (80) : (90))
45 crit: $this > (($status == $CRITICAL) ? (90) : (98))
46 delay: up 1m down 15m multiplier 1.5 max 1h
47 info: current disk space usage
50 template: disk_inode_usage
53 calc: $used * 100 / ($avail + $used)
56 warn: $this > (($status >= $WARNING) ? (80) : (90))
57 crit: $this > (($status == $CRITICAL) ? (90) : (98))
58 delay: up 1m down 15m multiplier 1.5 max 1h
59 info: current disk inode usage
63 # -----------------------------------------------------------------------------
66 # calculate the rate the disk fills
67 # use as base, the available space change
68 # during the last hour
70 # this is just a calculation - it has no alarm
71 # we will use it in the next template to find
74 template: disk_fill_rate
77 lookup: min -10m at -50m unaligned of avail
78 calc: ($this - $avail) / (($now - $after) / 3600)
81 info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour
84 # calculate the hours remaining
85 # if the disk continues to fill
88 template: out_of_disk_space_time
91 calc: ($disk_fill_rate > 0) ? ($avail / $disk_fill_rate) : (inf)
94 warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
95 crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
96 delay: down 15m multiplier 1.2 max 1h
97 info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last hour
101 # -----------------------------------------------------------------------------
104 # raise an alarm if the disk is congested
105 # by calculating the average disk utilization
106 # for the last 10 minutes
108 template: 10min_disk_utilization
111 lookup: average -10m unaligned
116 warn: $this > $green * (($status >= $WARNING) ? (0.7) : (1))
117 crit: $this > $red * (($status == $CRITICAL) ? (0.7) : (1))
118 delay: down 15m multiplier 1.2 max 1h
119 info: the percentage of time the disk was busy, during the last 10 minutes
123 # raise an alarm if the disk backlog
124 # is above 1000ms (1s) per second
126 # (i.e. the disk cannot catch up)
128 template: 10min_disk_backlog
131 lookup: average -10m unaligned
136 warn: $this > $green * (($status >= $WARNING) ? (0.7) : (1))
137 crit: $this > $red * (($status == $CRITICAL) ? (0.7) : (1))
138 delay: down 15m multiplier 1.2 max 1h
139 info: average of the kernel estimated disk backlog, for the last 10 minutes