master
conf 153 lines 5.21 KB
Raw
1 # you can disable an alarm notification by setting the 'to' line to: silent
2
3 # -----------------------------------------------------------------------------
4 # low disk space
5
6 # checking the latest collected values
7 # raise an alarm if the disk is low on
8 # available disk space
9
10 template: disk_space_usage
11 on: disk.space
12 class: Utilization
13 type: System
14 component: Disk
15 chart labels: mount_point=!/dev !/dev/* !/run !/run/* !HarddiskVolume* *
16 calc: $used * 100 / ($avail + $used)
17 units: %
18 every: 1m
19 warn: $this > (($status >= $WARNING ) ? (80) : (90))
20 crit: ($this > (($status == $CRITICAL) ? (90) : (98))) && $avail < 5
21 delay: up 1m down 15m multiplier 1.5 max 1h
22 summary: Disk ${label:mount_point} space usage
23 info: Total space utilization of disk ${label:mount_point}
24 to: sysadmin
25
26 template: disk_inode_usage
27 on: disk.inodes
28 class: Utilization
29 type: System
30 component: Disk
31 chart labels: mount_point=!/dev !/dev/* !/run !/run/* *
32 calc: $used * 100 / ($avail + $used)
33 units: %
34 every: 1m
35 warn: $this > (($status >= $WARNING) ? (80) : (90))
36 crit: $this > (($status == $CRITICAL) ? (90) : (98))
37 delay: up 1m down 15m multiplier 1.5 max 1h
38 summary: Disk ${label:mount_point} inode usage
39 info: Total inode utilization of disk ${label:mount_point}
40 to: sysadmin
41
42
43 # -----------------------------------------------------------------------------
44 # disk fill rate
45
46 # calculate the rate the disk fills
47 # use as base, the available space change
48 # during the last hour
49
50 # this is just a calculation - it has no alarm
51 # we will use it in the next template to find
52 # the hours remaining
53
54 template: disk_fill_rate
55 on: disk.space
56 lookup: min -10m at -50m unaligned of avail
57 calc: ($this - $avail) / (($now - $after) / 3600)
58 every: 1m
59 units: GB/hour
60 info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour
61
62 # calculate the hours remaining
63 # if the disk continues to fill in this rate
64
65 template: out_of_disk_space_time
66 on: disk.space
67 calc: ($disk_fill_rate > 0) ? ($avail / $disk_fill_rate) : (inf)
68 units: hours
69 every: 10s
70 warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
71 crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
72 delay: down 15m multiplier 1.2 max 1h
73 summary: Disk ${label:mount_point} estimation of lack of space
74 info: Estimated time the disk ${label:mount_point} will run out of space, if the system continues to add data with the rate of the last hour
75 to: silent
76
77
78 # -----------------------------------------------------------------------------
79 # disk inode fill rate
80
81 # calculate the rate the disk inodes are allocated
82 # use as base, the available inodes change
83 # during the last hour
84
85 # this is just a calculation - it has no alarm
86 # we will use it in the next template to find
87 # the hours remaining
88
89 template: disk_inode_rate
90 on: disk.inodes
91 lookup: min -10m at -50m unaligned of avail
92 calc: ($this - $avail) / (($now - $after) / 3600)
93 every: 1m
94 units: inodes/hour
95 info: average rate at which disk inodes are allocated (positive), or freed (negative), for the last hour
96
97 # calculate the hours remaining
98 # if the disk inodes are allocated
99 # in this rate
100
101 template: out_of_disk_inodes_time
102 on: disk.inodes
103 calc: ($disk_inode_rate > 0) ? ($avail / $disk_inode_rate) : (inf)
104 units: hours
105 every: 10s
106 warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
107 crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
108 delay: down 15m multiplier 1.2 max 1h
109 summary: Disk ${label:mount_point} estimation of lack of inodes
110 info: Estimated time the disk ${label:mount_point} will run out of inodes, if the system continues to allocate inodes with the rate of the last hour
111 to: silent
112
113
114 # -----------------------------------------------------------------------------
115 # disk congestion
116
117 # raise an alarm if the disk is congested
118 # by calculating the average disk utilization
119 # for the last 10 minutes
120
121 template: 10min_disk_utilization
122 on: disk.util
123 class: Utilization
124 type: System
125 component: Disk
126 lookup: average -10m unaligned
127 units: %
128 every: 1m
129 warn: $this > 98 * (($status >= $WARNING) ? (0.7) : (1))
130 delay: down 15m multiplier 1.2 max 1h
131 summary: Disk ${label:device} utilization
132 info: Average percentage of time ${label:device} disk was busy over the last 10 minutes
133 to: silent
134
135
136 # raise an alarm if the disk backlog
137 # is above 1000ms (1s) per second
138 # for 10 minutes
139 # (i.e. the disk cannot catch up)
140
141 template: 10min_disk_backlog
142 on: disk.backlog
143 class: Latency
144 type: System
145 component: Disk
146 lookup: average -10m unaligned
147 units: ms
148 every: 1m
149 warn: $this > 5000 * (($status >= $WARNING) ? (0.7) : (1))
150 delay: down 15m multiplier 1.2 max 1h
151 summary: Disk ${label:device} backlog
152 info: Average backlog size of the ${label:device} disk over the last 10 minutes
153 to: silent