cgroups.conf 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. template: cgroup_10min_cpu_usage
  3. on: cgroup.cpu_limit
  4. class: Utilization
  5. type: Cgroups
  6. component: CPU
  7. os: linux
  8. hosts: *
  9. lookup: average -10m unaligned
  10. units: %
  11. every: 1m
  12. warn: $this > (($status >= $WARNING) ? (75) : (85))
  13. crit: $this > (($status == $CRITICAL) ? (85) : (95))
  14. delay: down 15m multiplier 1.5 max 1h
  15. info: average cgroup CPU utilization over the last 10 minutes
  16. to: sysadmin
  17. template: cgroup_ram_in_use
  18. on: cgroup.mem_usage
  19. class: Utilization
  20. type: Cgroups
  21. component: Memory
  22. os: linux
  23. hosts: *
  24. calc: ($ram) * 100 / $memory_limit
  25. units: %
  26. every: 10s
  27. warn: $this > (($status >= $WARNING) ? (80) : (90))
  28. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  29. delay: down 15m multiplier 1.5 max 1h
  30. info: cgroup memory utilization
  31. to: sysadmin
  32. # -----------------------------------------------------------------------------
  33. # check for packet storms
  34. # 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
  35. # 2. do the same for the last 10s
  36. # 3. raise an alarm if the later is 10x or 20x the first
  37. # we assume the minimum packet storm should at least have
  38. # 10000 packets/s, average of the last 10 seconds
  39. template: cgroup_1m_received_packets_rate
  40. on: cgroup.net_packets
  41. class: Workload
  42. type: Cgroups
  43. component: Network
  44. hosts: *
  45. lookup: average -1m unaligned of received
  46. units: packets
  47. every: 10s
  48. info: average number of packets received by the network interface $family over the last minute
  49. template: cgroup_10s_received_packets_storm
  50. on: cgroup.net_packets
  51. class: Workload
  52. type: Cgroups
  53. component: Network
  54. hosts: *
  55. lookup: average -10s unaligned of received
  56. calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
  57. every: 10s
  58. units: %
  59. warn: $this > (($status >= $WARNING)?(200):(5000))
  60. crit: $this > (($status == $CRITICAL)?(5000):(6000))
  61. options: no-clear-notification
  62. info: ratio of average number of received packets for the network interface $family over the last 10 seconds, \
  63. compared to the rate over the last minute
  64. to: sysadmin