fluentd: log to a file instead of stdout

fluentd logs currently to stdout, which is known to produce big docker logs
in /var/lib/docker. This change makes fluentd to log to /var/log/kolla/fluentd.

Closes-Bug: #1888852
Change-Id: I8fe0e54cb764a26d26c6196cef68aadc6fd57b90
This commit is contained in:
Michal Nasiadka 2020-07-23 15:22:41 +02:00
parent 6bbc713885
commit 696533f228
4 changed files with 15 additions and 1 deletions

View File

@ -297,6 +297,7 @@
- { name: "designate", enabled: "{{ enable_designate }}" }
- { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" }
- { name: "etcd", enabled: "{{ enable_etcd }}" }
- { name: "fluentd", enabled: "yes" }
- { name: "freezer", enabled: "{{ enable_freezer }}" }
- { name: "glance", enabled: "{{ enable_glance }}" }
- { name: "glance-tls-proxy", enabled: "{{ enable_glance }}" }

View File

@ -0,0 +1,3 @@
"/var/log/kolla/fluentd/*.log"
{
}

View File

@ -31,7 +31,7 @@
{%- endmacro -%}
{
"command": "{{ fluentd_cmd }}",
"command": "{{ fluentd_cmd }} -o /var/log/kolla/fluentd/fluentd.log",
"config_files": [
{
"source": "{{ container_config_directory }}/td-agent.conf",
@ -46,6 +46,11 @@
{{ config_directory("output") }}
],
"permissions": [
{
"path": "/var/log/kolla/fluentd",
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",
"recurse": true
},
{
"path": "/var/log/kolla/haproxy",
"owner": "{{ fluentd_user }}:{{ fluentd_user }}",

View File

@ -0,0 +1,5 @@
---
fixes:
- |
``fluentd`` is now logging to ``/var/log/kolla/fluentd/fluentd.log``
instead of ``stdout``. `LP#1888852 <https://launchpad.net/bugs/1888852>`__