Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
4.6KB

  1. metric_collector:
  2. trigger:
  3. linux_system_cpu_critical:
  4. description: 'The CPU usage is too high.'
  5. severity: critical
  6. rules:
  7. - metric: cpu_wait
  8. relational_operator: '>='
  9. threshold: 35
  10. window: 120
  11. periods: 0
  12. function: avg
  13. - metric: cpu_idle
  14. relational_operator: <=
  15. threshold: 5
  16. window: 120
  17. function: avg
  18. linux_system_cpu_warning:
  19. description: 'The CPU wait times are high.'
  20. severity: critical
  21. rules:
  22. - metric: cpu_wait
  23. relational_operator: '>='
  24. threshold: 15
  25. window: 120
  26. periods: 0
  27. function: avg
  28. linux_system_swap_usage_critical:
  29. description: 'There is no more swap free space'
  30. severity: critical
  31. rules:
  32. - metric: swap_free
  33. relational_operator: '=='
  34. threshold: 0
  35. window: 60
  36. periods: 0
  37. function: max
  38. linux_system_swap_activity_warning:
  39. description: 'The swap activity is high'
  40. severity: warning
  41. rules:
  42. - metric: swap_io_in
  43. relational_operator: '>='
  44. threshold: 1048576 # 1 Mb/s
  45. window: 120
  46. periods: 0
  47. function: avg
  48. - metric: swap_io_out
  49. relational_operator: '>='
  50. threshold: 1048576 # 1 Mb/s
  51. window: 120
  52. periods: 0
  53. function: avg
  54. linux_system_swap_usage_warning:
  55. description: 'The swap free space is low'
  56. severity: warning
  57. rules:
  58. - metric: swap_percent_used
  59. relational_operator: '>='
  60. threshold: 0.8
  61. window: 60
  62. periods: 0
  63. function: avg
  64. linux_system_root_fs_warning:
  65. description: "The root filesystem's free space is low"
  66. severity: warning
  67. rules:
  68. - metric: fs_space_percent_free
  69. field:
  70. fs: '/'
  71. relational_operator: '<'
  72. threshold: 10
  73. window: 60
  74. periods: 0
  75. function: min
  76. linux_system_root_fs_critical:
  77. description: "The root filesystem's free space is too low"
  78. severity: critical
  79. rules:
  80. - metric: fs_space_percent_free
  81. field:
  82. fs: '/'
  83. relational_operator: '<'
  84. threshold: 5
  85. window: 60
  86. periods: 0
  87. function: min
  88. linux_system_network_warning_dropped_rx:
  89. description: 'Some received packets have been dropped'
  90. severity: warning
  91. rules:
  92. - metric: if_dropped_rx
  93. relational_operator: '>'
  94. threshold: 100
  95. window: 60
  96. periods: 0
  97. function: avg
  98. linux_system_network_critical_dropped_rx:
  99. description: 'Too many received packets have been dropped'
  100. severity: critical
  101. rules:
  102. - metric: if_dropped_rx
  103. relational_operator: '>'
  104. threshold: 1000
  105. window: 60
  106. periods: 0
  107. function: avg
  108. linux_system_network_warning_dropped_tx:
  109. description: 'Some transmitted packets have been dropped'
  110. severity: warning
  111. rules:
  112. - metric: if_dropped_tx
  113. relational_operator: '>'
  114. threshold: 100
  115. window: 60
  116. periods: 0
  117. function: avg
  118. linux_system_network_critical_dropped_tx:
  119. description: 'Too many transmitted packets have been dropped'
  120. severity: critical
  121. rules:
  122. - metric: if_dropped_tx
  123. relational_operator: '>'
  124. threshold: 1000
  125. function: avg
  126. window: 60
  127. linux_system_hdd_errors_critical:
  128. description: 'Errors on hard drive(s) have been detected'
  129. severity: critical
  130. no_data_policy: okay
  131. rules:
  132. - metric: hdd_errors_rate
  133. group_by: [device]
  134. relational_operator: '>'
  135. threshold: 0
  136. window: 60
  137. periods: 0
  138. function: max
  139. alarm:
  140. linux_system_cpu:
  141. alerting: enabled
  142. triggers:
  143. - linux_system_cpu_warning
  144. - linux_system_cpu_critical
  145. linux_system_swap:
  146. alerting: enabled
  147. triggers:
  148. - linux_system_swap_usage_critical
  149. - linux_system_swap_activity_warning
  150. - linux_system_swap_usage_warning
  151. linux_system_root_fs:
  152. alerting: enabled
  153. triggers:
  154. - linux_system_root_fs_critical
  155. - linux_system_root_fs_warning
  156. linux_system_network_rx:
  157. alerting: enabled
  158. triggers:
  159. - linux_system_network_critical_dropped_rx
  160. - linux_system_network_warning_dropped_rx
  161. linux_system_network_tx:
  162. alerting: enabled
  163. triggers:
  164. - linux_system_network_critical_dropped_tx
  165. - linux_system_network_warning_dropped_tx
  166. linux_system_hdd_errors:
  167. alerting: enabled_with_notification
  168. triggers:
  169. - linux_system_hdd_errors_critical