]> arthur.barton.de Git - netdata.git/commitdiff
prevent division by zero in memcached fill rate
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 12 Nov 2016 17:43:06 +0000 (19:43 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 12 Nov 2016 17:43:06 +0000 (19:43 +0200)
conf.d/health.d/memcached.conf

index 77be66c5cffd592d6d82ef678fc156064c1ed739..7917e36afb61f031c91e1e52cc39ccccc4aa68f2 100644 (file)
@@ -42,7 +42,7 @@ template: cache_fill_rate
 
 template: out_of_cache_space_time
       on: memcached.cache
-    calc: $available / $cache_fill_rate
+    calc: ($cache_fill_rate > 0) ? ($available / $cache_fill_rate) : (0)
    units: hours
    every: 10s
     warn: $this > 0 and $this < (($status >= $WARNING)  ? (48) : (8))