summaryrefslogtreecommitdiffstats
path: root/conf.d/health.d/disks.conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/health.d/disks.conf')
-rw-r--r--conf.d/health.d/disks.conf85
1 files changed, 85 insertions, 0 deletions
diff --git a/conf.d/health.d/disks.conf b/conf.d/health.d/disks.conf
new file mode 100644
index 000000000..c38f1a0a0
--- /dev/null
+++ b/conf.d/health.d/disks.conf
@@ -0,0 +1,85 @@
+# -----------------------------------------------------------------------------
+# low disk space
+
+# checking the latest collected values
+# raise an alarm if the disk is low on
+# available disk space
+
+template: disk_full_percent
+ on: disk.space
+ calc: $used * 100 / ($avail + $used)
+ every: 1m
+ warn: $this > 80
+ crit: $this > 95
+ units: %
+ info: current disk space usage
+
+
+# -----------------------------------------------------------------------------
+# disk fill rate
+
+# calculate the rate the disk fills
+# use as base, the available space change
+# during the last 30 minutes
+
+# 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: max -1s at -30m unaligned of avail
+ calc: ($this - $avail) / ($now - $after)
+ every: 15s
+ units: MB/s
+ info: average rate the disk fills up (positive), or frees up (negative) space, for the last 30 minutes
+
+
+# calculate the hours remaining
+# if the disk continues to fill
+# in this rate
+
+template: disk_full_after_hours
+ on: disk.space
+ calc: $avail / $disk_fill_rate / 3600
+ every: 10s
+ warn: $this > 0 and $this < 48
+ crit: $this > 0 and $this < 24
+ 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 30 minutes
+
+
+# -----------------------------------------------------------------------------
+# 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
+
+
+# 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