68 lines
2.3 KiB
Django/Jinja
68 lines
2.3 KiB
Django/Jinja
{% set fluentd_user = fluentd_binary %}
|
|
{% set fluentd_dir = '/etc/' ~ fluentd_binary %}
|
|
|
|
{% if fluentd_binary == 'fluentd' %}
|
|
{% set fluentd_conf = 'fluent.conf' %}
|
|
{% if kolla_base_distro in ['ubuntu', 'debian'] %}
|
|
{% set fluentd_cmd = '/usr/local/bin/fluentd -c ' ~ fluentd_dir ~ '/' ~ fluentd_conf %}
|
|
{% else %}
|
|
{% set fluentd_cmd = '/usr/bin/fluentd -c ' ~ fluentd_dir ~ '/' ~ fluentd_conf %}
|
|
{% endif %}
|
|
{% elif fluentd_binary == 'td-agent' %}
|
|
{% set fluentd_conf = fluentd_binary ~ '.conf' %}
|
|
{% set fluentd_cmd = '/usr/sbin/td-agent' %}
|
|
{% endif %}
|
|
|
|
{
|
|
"command": "{{ fluentd_cmd }} -o /var/log/kolla/fluentd/fluentd.log",
|
|
"config_files": [
|
|
{
|
|
"source": "{{ container_config_directory }}/td-agent.conf",
|
|
"dest": "{{ fluentd_dir }}/{{ fluentd_conf }}",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
}
|
|
],
|
|
"permissions": [
|
|
{
|
|
"path": "/var/log/kolla/fluentd",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{% if enable_haproxy | bool and inventory_hostname in groups['loadbalancer'] %}
|
|
{
|
|
"path": "/var/log/kolla/haproxy",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{% endif %}
|
|
{% if glance_enable_tls_backend | bool %}
|
|
{
|
|
"path": "/var/log/kolla/glance-tls-proxy",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{% endif %}
|
|
{% if neutron_enable_tls_backend | bool %}
|
|
{
|
|
"path": "/var/log/kolla/neutron-tls-proxy",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{% endif %}
|
|
{% if enable_swift | bool and (inventory_hostname in groups['swift-proxy-server'] or inventory_hostname in groups['swift-account-server'] or inventory_hostname in groups['swift-container-server'] or inventory_hostname in groups['swift-object-server']) %}
|
|
{
|
|
"path": "/var/log/kolla/swift",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{% endif %}
|
|
{
|
|
"path": "/var/lib/fluentd/data",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
}
|
|
]
|
|
|
|
}
|