diff --git a/ansible/roles/common/templates/conf/input/00-global.conf.j2 b/ansible/roles/common/templates/conf/input/00-global.conf.j2 index 9de2532e79..9b5cba8e66 100644 --- a/ansible/roles/common/templates/conf/input/00-global.conf.j2 +++ b/ansible/roles/common/templates/conf/input/00-global.conf.j2 @@ -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 ), diff --git a/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 b/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 index 329372a4c7..86ff6fa992 100644 --- a/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 +++ b/ansible/roles/common/templates/conf/input/02-mariadb.conf.j2 @@ -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' %} @type tail path /var/log/kolla/mariadb/mariadb.log diff --git a/ansible/roles/common/templates/conf/input/03-rabbitmq.conf.j2 b/ansible/roles/common/templates/conf/input/03-rabbitmq.conf.j2 index 78df0e283f..913f3755f5 100644 --- a/ansible/roles/common/templates/conf/input/03-rabbitmq.conf.j2 +++ b/ansible/roles/common/templates/conf/input/03-rabbitmq.conf.j2 @@ -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' %} @type tail path /var/log/kolla/rabbitmq/rabbit.log diff --git a/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 b/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 index b4e272ab9e..91b2ae33a7 100644 --- a/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 +++ b/ansible/roles/common/templates/conf/input/04-openstack-wsgi.conf.j2 @@ -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' %} @type tail path /var/log/kolla/*/*-access.log,/var/log/kolla/*/*-error.log diff --git a/ansible/roles/common/templates/conf/input/05-libvirt.conf.j2 b/ansible/roles/common/templates/conf/input/05-libvirt.conf.j2 index 3c41a4652e..ba4c40a434 100644 --- a/ansible/roles/common/templates/conf/input/05-libvirt.conf.j2 +++ b/ansible/roles/common/templates/conf/input/05-libvirt.conf.j2 @@ -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' %} @type tail path /var/log/kolla/libvirt/libvirtd.log diff --git a/ansible/roles/common/templates/conf/input/06-zookeeper.conf.j2 b/ansible/roles/common/templates/conf/input/06-zookeeper.conf.j2 index e80b8a3c32..49c733c63f 100644 --- a/ansible/roles/common/templates/conf/input/06-zookeeper.conf.j2 +++ b/ansible/roles/common/templates/conf/input/06-zookeeper.conf.j2 @@ -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' %} @type tail path /var/log/kolla/zookeeper/zookeeper.log diff --git a/ansible/roles/common/templates/conf/input/07-kafka.conf.j2 b/ansible/roles/common/templates/conf/input/07-kafka.conf.j2 index 15a2ee9205..22d22521a4 100644 --- a/ansible/roles/common/templates/conf/input/07-kafka.conf.j2 +++ b/ansible/roles/common/templates/conf/input/07-kafka.conf.j2 @@ -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' %} @type tail path /var/log/kolla/kafka/controller.log, /var/log/kolla/kafka/server.log, /var/log/kolla/kafka/state-change.log diff --git a/ansible/roles/common/templates/conf/input/08-opendaylight.conf.j2 b/ansible/roles/common/templates/conf/input/08-opendaylight.conf.j2 index a1c7744580..13c6906825 100644 --- a/ansible/roles/common/templates/conf/input/08-opendaylight.conf.j2 +++ b/ansible/roles/common/templates/conf/input/08-opendaylight.conf.j2 @@ -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' %} @type tail path /var/log/kolla/opendaylight/karaf.log diff --git a/ansible/roles/common/templates/fluentd.json.j2 b/ansible/roles/common/templates/fluentd.json.j2 index 8d6b6cba28..3ae1d5be0c 100644 --- a/ansible/roles/common/templates/fluentd.json.j2 +++ b/ansible/roles/common/templates/fluentd.json.j2 @@ -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": [