Saltstack Official Linux Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

65 行
2.0KB

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