Fluentd: Libvirt logs are missing

Libvirt logs are not managed by Fluentd. It can be very helpful to
debug 'booting' issue on KVM.

Change-Id: Ie04322adec0482f4d586d2f8564a1a77f2da2605
Closes-Bug: #1713429
This commit is contained in:
Bertrand Lallau 2017-08-28 10:36:05 +02:00 committed by Bertrand Lallau
parent 0e50f147e0
commit 792ab71471
3 changed files with 17 additions and 0 deletions

View File

@ -34,6 +34,7 @@
- "02-mariadb"
- "03-rabbitmq"
- "04-openstack-wsgi"
- "05-libvirt"
notify:
- Restart fluentd container

View File

@ -0,0 +1,10 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/libvirt/libvirtd.log
pos_file /var/run/{{ fluentd_dir }}/libvirt.pos
tag infra.libvirt
format /^(?<Timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}\+\d{4}): (?<Pid>\d+): (?<log_level>\S+) : (?<Payload>.*)?$/
time_key Timestamp
time_format %F %T.%L%z
</source>

View File

@ -41,6 +41,12 @@
"owner": "{{ fluentd_user }}",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/input/05-libvirt.conf",
"dest": "{{ fluentd_dir }}/input/05-libvirt.conf",
"owner": "{{ fluentd_user }}",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/filter/00-record_transformer.conf",
"dest": "{{ fluentd_dir }}/filter/00-record_transformer.conf",