From 5b057812416c0c055c57352ca6f1f7964b046428 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Tue, 21 Jul 2020 14:35:43 +0200 Subject: [PATCH] Fix fluentd warnings caused by "type copy" A "@type copy" statement is already present at the beginning of each match element, so extra "type copy" are not needed. They are causing the following warnings in fluentd logs: [warn]: parameter 'type' in [warn]: parameter 'type' in This commit also harmonizes indentation of the Monasca config block. Change-Id: I779c2b942d007acbdd43d999f2fc0cdc131d431f Related-Bug: #1885873 --- .../templates/conf/output/00-local.conf.j2 | 111 +++++++++--------- 1 file changed, 54 insertions(+), 57 deletions(-) diff --git a/ansible/roles/common/templates/conf/output/00-local.conf.j2 b/ansible/roles/common/templates/conf/output/00-local.conf.j2 index 8bb1f9c082..d1eb7ae79c 100644 --- a/ansible/roles/common/templates/conf/output/00-local.conf.j2 +++ b/ansible/roles/common/templates/conf/output/00-local.conf.j2 @@ -37,25 +37,24 @@ buffer_path /var/lib/fluentd/data/elasticsearch.buffer/{{ syslog_swift_facility }}.* {% elif enable_monasca | bool %} - type copy - - @type monasca - keystone_url {{ keystone_internal_url }} - monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} - monasca_api_version v2.0 - username {{ monasca_agent_user }} - password {{ monasca_agent_password }} - domain_id default - project_name {{ monasca_control_plane_project }} - message_field_name Payload - buffer_type file - buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_swift_facility }}.* - max_retry_wait 1800s - disable_retry_limit true - - chunk_limit_size 8m - - + + @type monasca + keystone_url {{ keystone_internal_url }} + monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} + monasca_api_version v2.0 + username {{ monasca_agent_user }} + password {{ monasca_agent_password }} + domain_id default + project_name {{ monasca_control_plane_project }} + message_field_name Payload + buffer_type file + buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_swift_facility }}.* + max_retry_wait 1800s + disable_retry_limit true + + chunk_limit_size 8m + + {% endif %} @@ -100,25 +99,24 @@ buffer_path /var/lib/fluentd/data/elasticsearch.buffer/{{ syslog_haproxy_facility }}.* {% elif enable_monasca | bool %} - type copy - - @type monasca - keystone_url {{ keystone_internal_url }} - monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} - monasca_api_version v2.0 - username {{ monasca_agent_user }} - password {{ monasca_agent_password }} - domain_id default - project_name {{ monasca_control_plane_project }} - message_field_name Payload - buffer_type file - buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_haproxy_facility }}.* - max_retry_wait 1800s - disable_retry_limit true - - chunk_limit_size 8m - - + + @type monasca + keystone_url {{ keystone_internal_url }} + monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} + monasca_api_version v2.0 + username {{ monasca_agent_user }} + password {{ monasca_agent_password }} + domain_id default + project_name {{ monasca_control_plane_project }} + message_field_name Payload + buffer_type file + buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_haproxy_facility }}.* + max_retry_wait 1800s + disable_retry_limit true + + chunk_limit_size 8m + + {% endif %} @@ -160,24 +158,23 @@ buffer_path /var/lib/fluentd/data/elasticsearch.buffer/{{ syslog_glance_tls_proxy_facility }}.* {% elif enable_monasca | bool %} - type copy - - @type monasca - keystone_url {{ keystone_internal_url }} - monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} - monasca_api_version v2.0 - username {{ monasca_agent_user }} - password {{ monasca_agent_password }} - domain_id default - project_name {{ monasca_control_plane_project }} - message_field_name Payload - buffer_type file - buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_glance_tls_proxy_facility }}.* - max_retry_wait 1800s - disable_retry_limit true - - chunk_limit_size 8m - - + + @type monasca + keystone_url {{ keystone_internal_url }} + monasca_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }} + monasca_api_version v2.0 + username {{ monasca_agent_user }} + password {{ monasca_agent_password }} + domain_id default + project_name {{ monasca_control_plane_project }} + message_field_name Payload + buffer_type file + buffer_path /var/lib/fluentd/data/monasca.buffer/{{ syslog_glance_tls_proxy_facility }}.* + max_retry_wait 1800s + disable_retry_limit true + + chunk_limit_size 8m + + {% endif %}