memcached.conf 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # detect if memcached cache is full
  2. template: memcached_cache_memory_usage
  3. on: memcached.cache
  4. class: Utilization
  5. type: KV Storage
  6. component: Memcached
  7. calc: $used * 100 / ($used + $available)
  8. units: %
  9. every: 10s
  10. warn: $this > (($status >= $WARNING) ? (70) : (80))
  11. crit: $this > (($status == $CRITICAL) ? (80) : (90))
  12. delay: up 0 down 15m multiplier 1.5 max 1h
  13. info: cache memory utilization
  14. to: dba
  15. # find the rate memcached cache is filling
  16. template: memcached_cache_fill_rate
  17. on: memcached.cache
  18. class: Utilization
  19. type: KV Storage
  20. component: Memcached
  21. lookup: min -10m at -50m unaligned of available
  22. calc: ($this - $available) / (($now - $after) / 3600)
  23. units: KB/hour
  24. every: 1m
  25. info: average rate the cache fills up (positive), or frees up (negative) space over the last hour
  26. # find the hours remaining until memcached cache is full
  27. template: memcached_out_of_cache_space_time
  28. on: memcached.cache
  29. class: Utilization
  30. type: KV Storage
  31. component: Memcached
  32. calc: ($memcached_cache_fill_rate > 0) ? ($available / $memcached_cache_fill_rate) : (inf)
  33. units: hours
  34. every: 10s
  35. warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
  36. crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
  37. delay: down 15m multiplier 1.5 max 1h
  38. info: estimated time the cache will run out of space \
  39. if the system continues to add data at the same rate as the past hour
  40. to: dba