Saltstack Official Linux Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

63 lines
1.9KB

  1. log_collector:
  2. decoder:
  3. system:
  4. engine: sandbox
  5. module_file: /usr/share/lma_collector/decoders/generic_syslog.lua
  6. module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
  7. adjust_timezone: true
  8. config:
  9. syslog_pattern: '%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n'
  10. input:
  11. linux_log_stream:
  12. engine: logstreamer
  13. log_directory: "/var/log"
  14. file_match: '(?P<Service>daemon\.log|cron\.log|haproxy\.log|kern\.log|auth\.log|syslog|messages|debug)'
  15. differentiator: [ 'system.', 'Service' ]
  16. decoder: "system_decoder"
  17. splitter: "TokenSplitter"
  18. filter:
  19. linux_hdd_errors:
  20. engine: sandbox
  21. module_file: /usr/share/lma_collector/filters/hdd_errors_counter.lua
  22. module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
  23. preserve_data: false
  24. message_matcher: "Type == 'log' && Logger == 'system.kern'"
  25. ticker_interval: 10
  26. config:
  27. grace_interval: 10
  28. patterns: "/error%s.+([sv]d[a-z][a-z]?)%d?/ /([sv]d[a-z][a-z]?)%d?.+%serror/"
  29. hostname: '{{ grains.host }}'
  30. metric_collector:
  31. trigger:
  32. linux_system_cpu_critical:
  33. description: 'The CPU usage is too high.'
  34. severity: critical
  35. rules:
  36. - metric: cpu_wait
  37. relational_operator: '>='
  38. threshold: 35
  39. window: 120
  40. periods: 0
  41. function: avg
  42. - metric: cpu_idle
  43. relational_operator: <=
  44. threshold: 5
  45. window: 120
  46. function: avg
  47. linux_system_cpu_warning:
  48. description: 'The CPU wait times are high.'
  49. severity: critical
  50. rules:
  51. - metric: cpu_wait
  52. relational_operator: '>='
  53. threshold: 15
  54. window: 120
  55. periods: 0
  56. function: avg
  57. alarm:
  58. linux_system_cpu:
  59. alerting: enabled
  60. triggers:
  61. - linux_system_cpu_warning
  62. - linux_system_cpu_critical