fluentd: Configure td-agent only for x86_64

For other architectures, fluentd is not installed using the
td-agent package.

Change-Id: I508bf16a54dcadac4b5cba03e184b4f620a2b395
Depends-On: https://review.openstack.org/638692
This commit is contained in:
Pedro Alvarez 2019-02-22 16:39:13 +00:00
parent 4a127d4bd9
commit 42926a03af
9 changed files with 23 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#jinja2: trim_blocks: False
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
{% set services = [
( 'aodh', enable_aodh ),
( 'barbican', enable_barbican ),

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/mariadb/mariadb.log

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/rabbitmq/rabbit.log

View File

@ -1,5 +1,5 @@
# Note (blallau): to manage Apache and WSGI log files
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/*/*-access.log,/var/log/kolla/*/*-error.log

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/libvirt/libvirtd.log

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/zookeeper/zookeeper.log

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/kafka/controller.log, /var/log/kolla/kafka/server.log, /var/log/kolla/kafka/state-change.log

View File

@ -1,4 +1,4 @@
{% set fluentd_dir = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% set fluentd_dir = 'td-agent' if (kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64') else 'fluentd' %}
<source>
@type tail
path /var/log/kolla/opendaylight/karaf.log

View File

@ -1,7 +1,18 @@
{% set fluentd_cmd = '/usr/sbin/td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else '/usr/bin/fluentd -c /etc/fluentd/fluent.conf' %}
{% set fluentd_dir = '/etc/td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else '/etc/fluentd' %}
{% set fluentd_conf = 'td-agent.conf' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluent.conf' %}
{% set fluentd_user = 'td-agent' if kolla_base_distro in ['ubuntu', 'debian'] else 'fluentd' %}
{% if kolla_base_distro in ['ubuntu', 'debian'] and ansible_architecture == 'x86_64' %}
{% set fluentd_cmd = '/usr/sbin/td-agent' %}
{% set fluentd_dir = '/etc/td-agent' %}
{% set fluentd_conf = 'td-agent.conf' %}
{% set fluentd_user = 'td-agent' %}
{% else %}
{% if kolla_base_distro in ['ubuntu', 'debian'] %}
{% set fluentd_cmd = '/usr/local/bin/fluentd -c /etc/fluentd/fluent.conf' %}
{% else %}
{% set fluentd_cmd = '/usr/bin/fluentd -c /etc/fluentd/fluent.conf' %}
{% endif %}
{% set fluentd_dir = '/etc/fluentd' %}
{% set fluentd_conf = 'fluent.conf' %}
{% set fluentd_user = 'fluentd' %}
{% endif %}
{
"command": "{{ fluentd_cmd }}",
"config_files": [