kolla-ansible/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2
Bertrand Lallau eab91d4288 Fluentd: rework and fix tail source config
Actually a unique 'tail' source is used for all logs files in
kolla/*/*.log.

So log files from services like: chrony, elasticsearch, etcd, grafana,
influxdb, kibana, mongodb... are actually processed by our Fluentd
config, but should not cause all following config will failed to parse
them. It just uses CPU for nothing cause they will
never match the following filters:
* record_transformer => add Hostname, Logger, programname field
* rewrite_tag_filter => rewrite 'programname' TAG if needed

Hence these filters should only be applied to Openstack services logs to
avoid CPU usage.

Furthermore WGI and Apache logs files must be treated differently.

Change-Id: I425979160291e1123e3775e39243bca06ed22c2f
Closes-Bug: #1711390
2017-08-29 08:46:55 +00:00

10 lines
352 B
Django/Jinja

# Note (blallau): to manage Apache and WSGI log files
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/*/*-access.log,/var/log/kolla/*/*-error.log
pos_file /var/run/{{ fluentd_dir }}/kolla-openstack-wsgi.pos
tag kolla.*
format /^(?<message>.*)$/
</source>