cgroups.conf 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 == $CRITICAL) ? (85) : (95))
  13. delay: down 15m multiplier 1.5 max 1h
  14. info: average cgroup CPU utilization over the last 10 minutes
  15. to: silent
  16. template: cgroup_ram_in_use
  17. on: cgroup.mem_usage
  18. class: Utilization
  19. type: Cgroups
  20. component: Memory
  21. os: linux
  22. hosts: *
  23. calc: ($ram) * 100 / $memory_limit
  24. units: %
  25. every: 10s
  26. warn: $this > (($status >= $WARNING) ? (80) : (90))
  27. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  28. delay: down 15m multiplier 1.5 max 1h
  29. info: cgroup memory utilization
  30. to: silent
  31. # FIXME COMMENTED DUE TO A BUG IN NETDATA
  32. ## -----------------------------------------------------------------------------
  33. ## check for packet storms
  34. #
  35. ## 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
  36. ## 2. do the same for the last 10s
  37. ## 3. raise an alarm if the later is 10x or 20x the first
  38. ## we assume the minimum packet storm should at least have
  39. ## 10000 packets/s, average of the last 10 seconds
  40. #
  41. # template: cgroup_1m_received_packets_rate
  42. # on: cgroup.net_packets
  43. # class: Workload
  44. # type: Cgroups
  45. #component: Network
  46. # hosts: *
  47. # lookup: average -1m unaligned of received
  48. # units: packets
  49. # every: 10s
  50. # info: average number of packets received by the network interface ${label:device} over the last minute
  51. #
  52. # template: cgroup_10s_received_packets_storm
  53. # on: cgroup.net_packets
  54. # class: Workload
  55. # type: Cgroups
  56. #component: Network
  57. # hosts: *
  58. # lookup: average -10s unaligned of received
  59. # calc: $this * 100 / (($1m_received_packets_rate < 1000)?(1000):($1m_received_packets_rate))
  60. # every: 10s
  61. # units: %
  62. # warn: $this > (($status >= $WARNING)?(200):(5000))
  63. # options: no-clear-notification
  64. # info: ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, \
  65. # compared to the rate over the last minute
  66. # to: sysadmin
  67. #
  68. # ---------------------------------K8s containers--------------------------------------------
  69. template: k8s_cgroup_10min_cpu_usage
  70. on: k8s.cgroup.cpu_limit
  71. class: Utilization
  72. type: Cgroups
  73. component: CPU
  74. os: linux
  75. hosts: *
  76. lookup: average -10m unaligned
  77. units: %
  78. every: 1m
  79. warn: $this > (($status >= $WARNING) ? (75) : (85))
  80. delay: down 15m multiplier 1.5 max 1h
  81. info: container ${label:k8s_container_name} of pod ${label:k8s_pod_name} of namespace ${label:k8s_namespace}, \
  82. average CPU utilization over the last 10 minutes
  83. to: silent
  84. template: k8s_cgroup_ram_in_use
  85. on: k8s.cgroup.mem_usage
  86. class: Utilization
  87. type: Cgroups
  88. component: Memory
  89. os: linux
  90. hosts: *
  91. calc: ($ram) * 100 / $memory_limit
  92. units: %
  93. every: 10s
  94. warn: $this > (($status >= $WARNING) ? (80) : (90))
  95. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  96. delay: down 15m multiplier 1.5 max 1h
  97. info: container ${label:k8s_container_name} of pod ${label:k8s_pod_name} of namespace ${label:k8s_namespace}, \
  98. memory utilization
  99. to: silent
  100. # check for packet storms
  101. # FIXME COMMENTED DUE TO A BUG IN NETDATA
  102. ## 1. calculate the rate packets are received in 1m: 1m_received_packets_rate
  103. ## 2. do the same for the last 10s
  104. ## 3. raise an alarm if the later is 10x or 20x the first
  105. ## we assume the minimum packet storm should at least have
  106. ## 10000 packets/s, average of the last 10 seconds
  107. #
  108. # template: k8s_cgroup_1m_received_packets_rate
  109. # on: k8s.cgroup.net_packets
  110. # class: Workload
  111. # type: Cgroups
  112. #component: Network
  113. # hosts: *
  114. # lookup: average -1m unaligned of received
  115. # units: packets
  116. # every: 10s
  117. # info: average number of packets received by the network interface ${label:device} over the last minute
  118. #
  119. # template: k8s_cgroup_10s_received_packets_storm
  120. # on: k8s.cgroup.net_packets
  121. # class: Workload
  122. # type: Cgroups
  123. #component: Network
  124. # hosts: *
  125. # lookup: average -10s unaligned of received
  126. # calc: $this * 100 / (($k8s_cgroup_10s_received_packets_storm < 1000)?(1000):($k8s_cgroup_10s_received_packets_storm))
  127. # every: 10s
  128. # units: %
  129. # warn: $this > (($status >= $WARNING)?(200):(5000))
  130. # options: no-clear-notification
  131. # info: ratio of average number of received packets for the network interface ${label:device} over the last 10 seconds, \
  132. # compared to the rate over the last minute
  133. # to: sysadmin