]> arthur.barton.de Git - netdata.git/blobdiff - 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
index d1603104019a3a6e3f79fbd8b1850f4557596240..9548f9ee01acd8ae247f5a03f35295a3cceac1e4 100644 (file)
@@ -5,12 +5,29 @@
 # raise an alarm if the disk is low on
 # available disk space
 
-template: disk_full_percent
+template: disk_space_usage
       on: disk.space
+families: *
     calc: $used * 100 / ($avail + $used)
+   units: %
    every: 1m
-    warn: $this > 80
-    crit: $this > 95
+    warn: $this > (($status >= $WARNING ) ? (80) : (90))
+    crit: $this > (($status == $CRITICAL) ? (90) : (98))
+   delay: up 1m down 15m multiplier 1.5 max 1h
+    info: current disk space usage
+      to: sysadmin
+
+template: disk_inode_usage
+      on: disk.inodes
+families: *
+    calc: $used * 100 / ($avail + $used)
+   units: %
+   every: 1m
+    warn: $this > (($status >= $WARNING)  ? (80) : (90))
+    crit: $this > (($status == $CRITICAL) ? (90) : (98))
+   delay: up 1m down 15m multiplier 1.5 max 1h
+    info: current disk inode usage
+      to: sysadmin
 
 
 # -----------------------------------------------------------------------------
@@ -18,7 +35,7 @@ template: disk_full_percent
 
 # calculate the rate the disk fills
 # use as base, the available space change
-# during the last 30 minutes
+# during the last hour
 
 # this is just a calculation - it has no alarm
 # we will use it in the next template to find
@@ -26,21 +43,29 @@ template: disk_full_percent
 
 template: disk_fill_rate
       on: disk.space
-  lookup: max -1s at -30m unaligned of avail
-    calc: ($this - $avail) / (30 * 60)
-   every: 15s
+families: *
+  lookup: min -10m at -50m unaligned of avail
+    calc: ($this - $avail) / (($now - $after) / 3600)
+   every: 1m
+   units: GB/hour
+    info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour
 
 
 # calculate the hours remaining
 # if the disk continues to fill
 # in this rate
 
-template: disk_full_after_hours
+template: out_of_disk_space_time
       on: disk.space
-    calc: $avail / $disk_fill_rate / 3600
+families: *
+    calc: ($disk_fill_rate > 0) ? ($avail / $disk_fill_rate) : (inf)
+   units: hours
    every: 10s
-    warn: $this > 0 and $this < 48
-    crit: $this > 0 and $this < 24
+    warn: $this > 0 and $this < (($status >= $WARNING)  ? (48) : (8))
+    crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
+   delay: down 15m multiplier 1.2 max 1h
+    info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last hour
+      to: sysadmin
 
 
 # -----------------------------------------------------------------------------
@@ -52,12 +77,17 @@ template: disk_full_after_hours
 
 template: 10min_disk_utilization
       on: disk.util
+families: *
   lookup: average -10m unaligned
+   units: %
    every: 1m
    green: 90
      red: 98
-    warn: $this > $green
-    crit: $this > $red
+    warn: $this > $green * (($status >= $WARNING)  ? (0.7) : (1))
+    crit: $this > $red   * (($status == $CRITICAL) ? (0.7) : (1))
+   delay: down 15m multiplier 1.2 max 1h
+    info: the percentage of time the disk was busy, during the last 10 minutes
+      to: sysadmin
 
 
 # raise an alarm if the disk backlog
@@ -67,9 +97,14 @@ template: 10min_disk_utilization
 
 template: 10min_disk_backlog
       on: disk.backlog
+families: *
   lookup: average -10m unaligned
+   units: ms
    every: 1m
-   green: 1000
-     red: 2000
-    warn: $this > $green
-    crit: $this > $red
+   green: 2000
+     red: 5000
+    warn: $this > $green * (($status >= $WARNING)  ? (0.7) : (1))
+    crit: $this > $red   * (($status == $CRITICAL) ? (0.7) : (1))
+   delay: down 15m multiplier 1.2 max 1h
+    info: average of the kernel estimated disk backlog, for the last 10 minutes
+      to: sysadmin