2 # make sure memcached is running
4 template: memcached_last_collected_secs
6 calc: $now - $last_collected_t
9 warn: $this > (($status >= $WARNING) ? ($update_every) : ( 5 * $update_every))
10 crit: $this > (($status == $CRITICAL) ? ($update_every) : (60 * $update_every))
11 delay: down 5m 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)
23 warn: $this > (($status >= $WARNING) ? (70) : (80))
24 crit: $this > (($status == $CRITICAL) ? (80) : (90))
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: ($cache_fill_rate > 0) ? ($available / $cache_fill_rate) : (inf)
48 warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
49 crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
50 delay: 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