]> arthur.barton.de Git - netdata.git/commitdiff
memcached alarms #810
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 27 Aug 2016 09:03:31 +0000 (12:03 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 27 Aug 2016 09:03:31 +0000 (12:03 +0300)
conf.d/health.d/disks.conf
conf.d/health.d/memcached.conf
conf.d/health.d/swap.conf

index d1603104019a3a6e3f79fbd8b1850f4557596240..7cfcad2784f55d10cdc4694751dbdd2003911ca8 100644 (file)
@@ -27,7 +27,7 @@ template: disk_full_percent
 template: disk_fill_rate
       on: disk.space
   lookup: max -1s at -30m unaligned of avail
-    calc: ($this - $avail) / (30 * 60)
+    calc: ($this - $avail) / ($now - $after)
    every: 15s
 
 
index 9e795b157f1496818ea21723e746a50fd57d85bb..604102e3f2919b88288b73e4dc3ce93f9ba32310 100644 (file)
@@ -8,3 +8,34 @@ template: memcached_last_collected_secs
     warn: $this > ( 5 * $update_every)
     crit: $this > (10 * $update_every)
 
+
+
+# detect if memcached cache is full
+
+template: cache_full_pcent
+      on: memcached.cache
+    calc: $used * 100 / ($used + $available)
+   every: 10s
+    warn: $this > 80
+    crit: $this > 90
+
+
+
+# find the rate memcached cache is filling
+
+template: cache_fill_rate
+      on: memcached.cache
+  lookup: max -1s at -30m unaligned of available
+    calc: ($this - $available) / ($now - $after)
+   every: 15s
+
+
+
+# find the hours remaining until memcached cache is full
+
+template: cache_full_after_hours
+      on: memcached.cache
+    calc: $available / $memcached_cache_fill_rate / 3600
+   every: 10s
+    warn: $this > 0 and $this < 48
+    crit: $this > 0 and $this < 24
index 64fd9b6058644ac1ae04b77bd0446f33bf662c23..39e6a523d1c48414ffd8ec529b554dde41d5a1d3 100644 (file)
@@ -1,7 +1,7 @@
 
    alarm: 30min_pcent_of_ram_swapped_out
       on: system.swapio
-  lookup: sum -30m unaligned of out
+  lookup: sum -30m unaligned absolute of out
           # we have to convert KB to MB by dividing $this (i.e. the result of the lookup) with 1024
     calc: $this / 1024 * 100 / ( $system.ram.used + $system.ram.cached + $system.ram.free )
    every: 1m