kolla-ansible/ansible/roles/common/templates/conf/input/08-opendaylight.conf.j2
Eduardo Gonzalez 76482c9a68 Fix fluentd input log parser for OpenDaylight
OpenDaylight logs have different format than openstack,
is a karaf log with java error traces.
This PS add required config to make fluentd parse properly
ODL logs.

Change-Id: I34fb96c8a424679b3b618f2ff6a840b8dc165bec
2018-11-20 14:24:25 +01:00

12 lines
527 B
Django/Jinja

{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/opendaylight/karaf.log
pos_file /var/run/{{ fluentd_dir }}/opendaylight.pos
tag infra.opendaylight
format multiline
format_firstline /\d{4}-\d{2}-\d{2}/
format1 /^(?<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3})\s+\|\s+(?<level>[^|\s]+)\s+\|\s+(?<thread>[^|]+)\s+\|\s+(?<class>[\d -}]+)\s+\|\s+(?<bundle>[^|]+)\s+\|\s+(?<msg>.*)/
time_format %Y-%m-%d %H:%M:%S,%L
</source>