kolla-ansible/ansible/roles/common/templates/conf/input/00-global.conf.j2
Radosław Piliszek 561b33cbb2 Fix deployment of fluentd without any enabled OpenStack services
Fluentd cannot accept empty 'path' parameter.

I refactored the service list following the general pattern
we have.

Change-Id: I83d820efcc7e86bac9f8bda26a8f8bece72159e6
Closes-bug: #1867953
2020-03-18 21:17:54 +01:00

26 lines
1.2 KiB
Django/Jinja

#jinja2: trim_blocks: False
{% if fluentd_enabled_input_openstack_services | length > 0 -%}
<source>
@type tail
path {% for service in fluentd_enabled_input_openstack_services %}/var/log/kolla/{{ service }}/*.log{% if not loop.last %},{% endif %}{% endfor %}
exclude_path ["/var/log/kolla/monasca/agent*.log",
"/var/log/kolla/monasca/grafana.log",
"/var/log/kolla/monasca/monasca-log-api.log",
"/var/log/kolla/neutron/dnsmasq.log",
"/var/log/kolla/*/*-access.log",
"/var/log/kolla/*/*-error.log",
"/var/log/kolla/*/*_access.log",
"/var/log/kolla/*/*_error.log"]
pos_file /var/run/{{ fluentd_binary }}/kolla-openstack.pos
tag kolla.*
format multiline
format_firstline /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} \d+ \S+ \S+ \[(req-\S+ \S+ \S+ \S+ \S+ \S+|-)\]/
format1 /^(?<Timestamp>\S+ \S+) (?<Pid>\d+) (?<log_level>\S+) (?<python_module>\S+) (\[(req-(?<request_id>\S+) (?<user_id>\S+) (?<tenant_id>\S+) (?<domain_id>\S+) (?<user_domain>\S+) (?<project_domain>\S+)|-)\])? (?<Payload>.*)?$/
time_key Timestamp
keep_time_key true
time_format %F %T.%L
ignore_repeated_permission_error true
enable_watch_timer false
</source>
{%- endif %}