kolla-ansible/ansible/roles/common/templates/fluentd.json.j2
Michal Nasiadka b97832dd4f Refactor fluentd syslog logging
Co-Authored-By: Mark Goddard <mark@stackhpc.com>

Change-Id: I75ca59d981bcd2dd51faa296ab0b4223a891f5cb
2022-02-11 11:33:38 +00:00

37 lines
1.1 KiB
Django/Jinja

{% set fluentd_user = 'td-agent' %}
{% set fluentd_dir = '/etc/td-agent' %}
{% set fluentd_conf = 'td-agent.conf' %}
{% set fluentd_cmd = '/usr/sbin/td-agent' %}
{
"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
},
{% for facility in syslog_facilities | selectattr('enabled') %}
{
"path": "/var/log/kolla/{{ facility.logdir }}",
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
"recurse": true
},
{% endfor %}
{
"path": "/var/lib/fluentd/data",
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
"recurse": true
}
]
}