Saltstack Official Linux Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

fluentd.yml 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {%- if grains.get('init') == 'systemd' %}
  2. agent:
  3. plugin:
  4. fluent-plugin-systemd:
  5. gem: ['fluent-plugin-systemd']
  6. config:
  7. label:
  8. systemd:
  9. input:
  10. systemd:
  11. type: systemd
  12. tag: systemd.source
  13. path: /run/log/journal
  14. pos_file: {{ pillar.fluentd.agent.dir.positiondb }}/systemd.source.pos
  15. entry:
  16. field_map:
  17. MESSAGE: 'Payload'
  18. _CMDLINE: 'process'
  19. _PID: 'Pid'
  20. _COMM: 'programname'
  21. _SYSTEMD_UNIT: 'service'
  22. syslog_identifier: 'ident'
  23. priority: 'Severity'
  24. field_map_strict: True
  25. fields_strip_underscores: True
  26. fields_lowercase: True
  27. filter:
  28. add_severity_label:
  29. tag: systemd.source
  30. type: record_transformer
  31. enable_ruby: true
  32. record:
  33. - name: severity_label
  34. value: '${ {"TRACE"=>8,"DEBUG"=>7,"INFO"=>6,"NOTICE"=>5,"WARNING"=>4,"ERROR"=>3,"CRITICAL"=>2,"ALERT"=>1,"EMERGENCY"=>0}.key(record["Severity"].to_i) }'
  35. match:
  36. rewrite_tag:
  37. tag: systemd.source
  38. type: rewrite_tag_filter
  39. rule:
  40. - name: service
  41. regexp: '^(.*)\.(.*)$'
  42. result: __TAG__.$1
  43. push_to_default:
  44. tag: 'systemd.source.*'
  45. type: relabel
  46. label: default_output
  47. {%- endif %}