]> arthur.barton.de Git - netdata.git/blob - conf.d/health.d/disks.conf
ab-debian 0.20170327.01-0ab1, upstream v1.6.0-42-gaa6b96fc
[netdata.git] / conf.d / health.d / disks.conf
1 # -----------------------------------------------------------------------------
2 # low disk space
3
4 # checking the latest collected values
5 # raise an alarm if the disk is low on
6 # available disk space
7
8 template: disk_space_usage
9       on: disk.space
10 families: *
11     calc: $used * 100 / ($avail + $used)
12    units: %
13    every: 1m
14     warn: $this > (($status >= $WARNING ) ? (80) : (90))
15     crit: $this > (($status == $CRITICAL) ? (90) : (98))
16    delay: up 1m down 15m multiplier 1.5 max 1h
17     info: current disk space usage
18       to: sysadmin
19
20 template: disk_inode_usage
21       on: disk.inodes
22 families: *
23     calc: $used * 100 / ($avail + $used)
24    units: %
25    every: 1m
26     warn: $this > (($status >= $WARNING)  ? (80) : (90))
27     crit: $this > (($status == $CRITICAL) ? (90) : (98))
28    delay: up 1m down 15m multiplier 1.5 max 1h
29     info: current disk inode usage
30       to: sysadmin
31
32
33 # -----------------------------------------------------------------------------
34 # disk fill rate
35
36 # calculate the rate the disk fills
37 # use as base, the available space change
38 # during the last hour
39
40 # this is just a calculation - it has no alarm
41 # we will use it in the next template to find
42 # the hours remaining
43
44 template: disk_fill_rate
45       on: disk.space
46 families: *
47   lookup: min -10m at -50m unaligned of avail
48     calc: ($this - $avail) / (($now - $after) / 3600)
49    every: 1m
50    units: GB/hour
51     info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour
52
53
54 # calculate the hours remaining
55 # if the disk continues to fill
56 # in this rate
57
58 template: out_of_disk_space_time
59       on: disk.space
60 families: *
61     calc: ($disk_fill_rate > 0) ? ($avail / $disk_fill_rate) : (inf)
62    units: hours
63    every: 10s
64     warn: $this > 0 and $this < (($status >= $WARNING)  ? (48) : (8))
65     crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
66    delay: down 15m multiplier 1.2 max 1h
67     info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last hour
68       to: sysadmin
69
70
71 # -----------------------------------------------------------------------------
72 # disk congestion
73
74 # raise an alarm if the disk is congested
75 # by calculating the average disk utilization
76 # for the last 10 minutes
77
78 template: 10min_disk_utilization
79       on: disk.util
80 families: *
81   lookup: average -10m unaligned
82    units: %
83    every: 1m
84    green: 90
85      red: 98
86     warn: $this > $green * (($status >= $WARNING)  ? (0.7) : (1))
87     crit: $this > $red   * (($status == $CRITICAL) ? (0.7) : (1))
88    delay: down 15m multiplier 1.2 max 1h
89     info: the percentage of time the disk was busy, during the last 10 minutes
90       to: sysadmin
91
92
93 # raise an alarm if the disk backlog
94 # is above 1000ms (1s) per second
95 # for 10 minutes
96 # (i.e. the disk cannot catch up)
97
98 template: 10min_disk_backlog
99       on: disk.backlog
100 families: *
101   lookup: average -10m unaligned
102    units: ms
103    every: 1m
104    green: 2000
105      red: 5000
106     warn: $this > $green * (($status >= $WARNING)  ? (0.7) : (1))
107     crit: $this > $red   * (($status == $CRITICAL) ? (0.7) : (1))
108    delay: down 15m multiplier 1.2 max 1h
109     info: average of the kernel estimated disk backlog, for the last 10 minutes
110       to: sysadmin