fb4651461b
In some scenarios it may be useful to configure custom fluentd outputs to forward logs to a logging service other than elasticsearch. This change supports configuration of fluentd outputs by placing output configuration files in /etc/kolla/config/fluentd/output/*.conf. Change-Id: I3c0b271d88dbb307ba3a23546e29c72e8baeca55 Implements: blueprint fluentd-custom-outputs
97 lines
3.7 KiB
Django/Jinja
97 lines
3.7 KiB
Django/Jinja
{% 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' %}
|
|
{
|
|
"command": "{{ fluentd_cmd }}",
|
|
"config_files": [
|
|
{
|
|
"source": "{{ container_config_directory }}/td-agent.conf",
|
|
"dest": "{{ fluentd_dir }}/{{ fluentd_conf }}",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/00-global.conf",
|
|
"dest": "{{ fluentd_dir }}/input/00-global.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/01-syslog.conf",
|
|
"dest": "{{ fluentd_dir }}/input/01-syslog.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/02-mariadb.conf",
|
|
"dest": "{{ fluentd_dir }}/input/02-mariadb.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/03-rabbitmq.conf",
|
|
"dest": "{{ fluentd_dir }}/input/03-rabbitmq.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/04-openstack-wsgi.conf",
|
|
"dest": "{{ fluentd_dir }}/input/04-openstack-wsgi.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/input/05-libvirt.conf",
|
|
"dest": "{{ fluentd_dir }}/input/05-libvirt.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/filter/00-record_transformer.conf",
|
|
"dest": "{{ fluentd_dir }}/filter/00-record_transformer.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/filter/01-rewrite.conf",
|
|
"dest": "{{ fluentd_dir }}/filter/01-rewrite.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/format/apache_access.conf",
|
|
"dest": "{{ fluentd_dir }}/format/apache_access.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{
|
|
"source": "{{ container_config_directory }}/format/wsgi_access.conf",
|
|
"dest": "{{ fluentd_dir }}/format/wsgi_access.conf",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
},
|
|
{# Copy all configuration files in output/ directory to include #}
|
|
{# custom output configs. #}
|
|
{
|
|
"source": "{{ container_config_directory }}/output/*.conf",
|
|
"dest": "{{ fluentd_dir }}/output/",
|
|
"owner": "{{ fluentd_user }}",
|
|
"perm": "0600"
|
|
}
|
|
],
|
|
"permissions": [
|
|
{
|
|
"path": "/var/log/kolla/haproxy",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
},
|
|
{
|
|
"path": "/var/log/kolla/swift",
|
|
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
|
|
"recurse": true
|
|
}
|
|
]
|
|
|
|
}
|