memcached.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. summary: Memcached memory utilization
  14. info: Cache memory utilization
  15. to: dba
  16. # find the rate memcached cache is filling
  17. template: memcached_cache_fill_rate
  18. on: memcached.cache
  19. class: Utilization
  20. type: KV Storage
  21. component: Memcached
  22. lookup: min -10m at -50m unaligned of available
  23. calc: ($this - $available) / (($now - $after) / 3600)
  24. units: KB/hour
  25. every: 1m
  26. info: Average rate the cache fills up (positive), or frees up (negative) space over the last hour
  27. # find the hours remaining until memcached cache is full
  28. template: memcached_out_of_cache_space_time
  29. on: memcached.cache
  30. class: Utilization
  31. type: KV Storage
  32. component: Memcached
  33. calc: ($memcached_cache_fill_rate > 0) ? ($available / $memcached_cache_fill_rate) : (inf)
  34. units: hours
  35. every: 10s
  36. warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
  37. crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
  38. delay: down 15m multiplier 1.5 max 1h
  39. summary: Memcached estimation of lack of cache space
  40. info: Estimated time the cache will run out of space \
  41. if the system continues to add data at the same rate as the past hour
  42. to: dba