Skip to content
Snippets Groups Projects
02-mariadb.conf.j2 930 B
Newer Older
# mysqld and its wrapper script mysqld_safe output logs using a different timestamp.
# Defer parsing the logs until the different formats have been retagged.
zhubingbing's avatar
zhubingbing committed
<source>
  @type tail
  path /var/log/kolla/mariadb/mariadb.log
  pos_file /var/run/{{ fluentd_user }}/mariadb.pos
  enable_watch_timer false
  <parse>
    @type multiline
    format_firstline /^(\d{4}-\d{2}-\d{2}|\d{6}) /
    format1 /^(?<Payload>.*)/
  </parse>
zhubingbing's avatar
zhubingbing committed
</source>
<source>
  @type tail
  path /var/log/kolla/mariadb/xinetd.log
  pos_file /var/run/{{ fluentd_user }}/mariadb-xinetd.pos
  tag infra.mariadb-xinetd
  ignore_repeated_permission_error true
  enable_watch_timer false
  <parse>
    @type multiline
    format_firstline /^\d{2}/\d{1,2}/\d{1,2}@\d{1,2}:\d{1,2}:\d{1,2}\: (START|EXIT)\: /
    format1 /^(?<Timestamp>\S+) (?<Payload>.*)?$/
    time_key Timestamp
    keep_time_key true
    time_format %y/%m/%d@%T
  </parse>