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.

42 lines
1.3KB

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