
By default a retry limit of 17 exists. When the limit is reached buffered logs are discarded. To avoid this, we disable the retry limit. The risk of bringing down the host by filling the Fluent data docker volume is managed by the maximum buffer size which is 2GB by default. In summary, after this change, the net behaviour is that Fluentd should buffer up to a maximum of 2GB of logs locally, and attept to post them to the Monasca Log API at intervals not exceeding 30 minutes. Closes-Bug: #1855702 Change-Id: I0d5a3dab29635c00411f4f51e5a0721726df2abd
102 lines
3.3 KiB
Django/Jinja
102 lines
3.3 KiB
Django/Jinja
<match syslog.{{ syslog_swift_facility }}.**>
|
|
@type copy
|
|
<store>
|
|
@type file
|
|
path /var/log/kolla/swift/swift_latest.*.log
|
|
utc
|
|
append true
|
|
compress gzip
|
|
</store>
|
|
{% if log_direct_to_elasticsearch %}
|
|
<store>
|
|
type elasticsearch
|
|
host {{ elasticsearch_address }}
|
|
port {{ elasticsearch_port }}
|
|
scheme {{ fluentd_elasticsearch_scheme }}
|
|
{% if fluentd_elasticsearch_path != '' %}
|
|
path {{ fluentd_elasticsearch_path }}
|
|
{% endif %}
|
|
{% if fluentd_elasticsearch_scheme == 'https' %}
|
|
ssl_version {{ fluentd_elasticsearch_ssl_version }}
|
|
ssl_verify {{ fluentd_elasticsearch_ssl_verify }}
|
|
{% endif %}
|
|
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != ''%}
|
|
user {{ fluentd_elasticsearch_user }}
|
|
password {{ fluentd_elasticsearch_password }}
|
|
{% endif %}
|
|
logstash_format true
|
|
logstash_prefix {{ kibana_log_prefix }}
|
|
flush_interval 15s
|
|
</store>
|
|
{% elif enable_monasca | bool %}
|
|
type copy
|
|
<store>
|
|
@type monasca
|
|
keystone_url {{ keystone_internal_url }}
|
|
monasca_log_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }}
|
|
monasca_log_api_version v3.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
|
|
</store>
|
|
{% endif %}
|
|
</match>
|
|
|
|
<match syslog.{{ syslog_haproxy_facility }}.**>
|
|
@type copy
|
|
<store>
|
|
@type file
|
|
path /var/log/kolla/haproxy/haproxy_latest.*.log
|
|
output_tag false
|
|
output_time false
|
|
utc
|
|
append true
|
|
compress gzip
|
|
</store>
|
|
{% if log_direct_to_elasticsearch %}
|
|
<store>
|
|
type elasticsearch
|
|
host {{ elasticsearch_address }}
|
|
port {{ elasticsearch_port }}
|
|
scheme {{ fluentd_elasticsearch_scheme }}
|
|
{% if fluentd_elasticsearch_path != '' %}
|
|
path {{ fluentd_elasticsearch_path }}
|
|
{% endif %}
|
|
{% if fluentd_elasticsearch_scheme == 'https' %}
|
|
ssl_version {{ fluentd_elasticsearch_ssl_version }}
|
|
ssl_verify {{ fluentd_elasticsearch_ssl_verify }}
|
|
{% endif %}
|
|
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != ''%}
|
|
user {{ fluentd_elasticsearch_user }}
|
|
password {{ fluentd_elasticsearch_password }}
|
|
{% endif %}
|
|
logstash_format true
|
|
logstash_prefix {{ kibana_log_prefix }}
|
|
flush_interval 15s
|
|
</store>
|
|
{% elif enable_monasca | bool %}
|
|
type copy
|
|
<store>
|
|
@type monasca
|
|
keystone_url {{ keystone_internal_url }}
|
|
monasca_log_api {{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ monasca_log_api_port }}
|
|
monasca_log_api_version v3.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
|
|
</store>
|
|
{% endif %}
|
|
</match>
|