2 # make sure memcached is running
4 template: memcached_last_collected_secs
6 calc: $now - $last_collected_t
9 warn: $this > ( 5 * $update_every)
10 crit: $this > (60 * $update_every)
11 delay: up 0 down 15m multiplier 1.5 max 1h
12 info: number of seconds since the last successful data collection
16 # detect if memcached cache is full
18 template: memcached_cache_memory_usage
20 calc: $used * 100 / ($used + $available)
25 delay: up 0 down 15m multiplier 1.5 max 1h
26 info: current cache memory usage
30 # find the rate memcached cache is filling
32 template: cache_fill_rate
34 lookup: min -10m at -50m unaligned of available
35 calc: ($this - $available) / (($now - $after) / 3600)
38 info: average rate the cache fills up (positive), or frees up (negative) space, for the last hour
41 # find the hours remaining until memcached cache is full
43 template: out_of_cache_space_time
45 calc: $available / $cache_fill_rate
48 warn: $this > 0 and $this < 8
49 crit: $this > 0 and $this < 2
50 delay: up 0 down 15m multiplier 1.5 max 1h
51 info: estimated time the cache will run out of space, if the system continues to add data with the rate of the last hour