Add disk inode usage rate health alarms (like disk fill rate)
Adalbert Michelic committed
Mar 21, 2018 at 15:10 UTC
e7bc8f877dd9cca8ed9cf37f006ed8c39e10678c
1 file changed
+41
conf.d/health.d/disks.conf
+41
@@ -80,6 +80,47 @@ families: *
80
to: sysadmin
81
82
83
+# -----------------------------------------------------------------------------
84
+# disk inode fill rate
85
+
86
+# calculate the rate the disk inodes are allocated
87
+# use as base, the available inodes change
88
+# during the last hour
89
+
90
+# this is just a calculation - it has no alarm
91
+# we will use it in the next template to find
92
+# the hours remaining
93
+
94
+template: disk_inode_rate
95
+ on: disk.inodes
96
+ os: linux freebsd
97
+ hosts: *
98
+families: *
99
+ lookup: min -10m at -50m unaligned of avail
100
+ calc: ($this - $avail) / (($now - $after) / 3600)
101
+ every: 1m
102
+ units: inodes/hour
103
+ info: average rate at which disk inodes are allocated (positive), or freed (negative), for the last hour
104
+
105
+# calculate the hours remaining
106
+# if the disk inodes are allocated
107
+# in this rate
108
+
109
+template: out_of_disk_inodes_time
110
+ on: disk.inodes
111
+ os: linux freebsd
112
+ hosts: *
113
+families: *
114
+ calc: ($disk_inode_rate > 0) ? ($avail / $disk_inode_rate) : (inf)
115
+ units: hours
116
+ every: 10s
117
+ warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
118
+ crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
119
+ delay: down 15m multiplier 1.2 max 1h
120
+ info: estimated time the disk will run out of inodes, if the system continues to allocate inodes with the rate of the last hour
121
+ to: sysadmin
122
+
123
+
124
# -----------------------------------------------------------------------------
125
# disk congestion
126