Skip to content
Snippets Groups Projects
fluentd.json.j2 1.07 KiB
Newer Older
{% set fluentd_dir = '/etc/' + (fluentd_cmd | default('td-agent')) %}
{% set fluentd_conf = (fluentd_cmd | default('td-agent')) + '.conf' %}
zhubingbing's avatar
zhubingbing committed
{
    "command": "{{ fluentd_cmd }} -c {{ fluentd_dir }}/{{ fluentd_conf }} -o /var/log/kolla/fluentd/fluentd.log",
zhubingbing's avatar
zhubingbing committed
    "config_files": [
        {
            "source": "{{ container_config_directory }}/td-agent.conf",
            "dest": "{{ fluentd_dir }}/{{ fluentd_conf }}",
            "owner": "{{ fluentd_user }}",
zhubingbing's avatar
zhubingbing committed
            "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
zhubingbing's avatar
zhubingbing committed
    ]
zhubingbing's avatar
zhubingbing committed
}