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.

47 line
1.8KB

  1. {%- from "linux/map.jinja" import system with context %}
  2. log_collector:
  3. decoder:
  4. system:
  5. engine: sandbox
  6. module_file: /usr/share/lma_collector/decoders/generic_syslog.lua
  7. module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
  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. {%- if system.timezone is defined %}
  12. tz: "{{ system.timezone }}"
  13. {%- endif %}
  14. input:
  15. linux_log_stream:
  16. engine: logstreamer
  17. log_directory: "/var/log"
  18. file_match: '(?P<Service>daemon\.log|cron\.log|haproxy\.log|kern\.log|auth\.log|syslog|messages|debug)'
  19. differentiator: [ 'system.', 'Service' ]
  20. decoder: "system_decoder"
  21. splitter: "TokenSplitter"
  22. filter:
  23. linux_hdd_errors:
  24. engine: sandbox
  25. module_file: /usr/share/lma_collector/filters/hdd_errors_counter.lua
  26. module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
  27. preserve_data: false
  28. message_matcher: "Type == 'log' && Logger == 'system.kern'"
  29. ticker_interval: 10
  30. config:
  31. grace_interval: 10
  32. patterns: "/error%s.+([sv]d[a-z][a-z]?)%d?/ /([sv]d[a-z][a-z]?)%d?.+%serror/"
  33. hostname: '{{ grains.host }}'
  34. linux_logs_counter:
  35. engine: sandbox
  36. module_file: /usr/share/lma_collector/filters/logs_counter.lua
  37. module_dir: /usr/share/lma_collector/common;/usr/share/heka/lua_modules
  38. preserve_data: true
  39. message_matcher: "Type == 'log' && Logger =~ /^openstack\\\\./"
  40. ticker_interval: 1
  41. config:
  42. interval: 60
  43. grace_interval: 30
  44. hostname: '{{ grains.host }}'
  45. metric_collector:
  46. filter: {}