aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2
blob: 02d39f037d95072a0225ebf36c3c1c1b64cbc80a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% for match_pattern in ['retry_os', '**',] %}
<match {{ match_pattern }} >
    @type copy
    <store>
       @type opensearch
       hosts {% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}
       port {{ opensearch_port }}
       scheme {{ fluentd_opensearch_scheme }}
{% if fluentd_opensearch_user != '' and fluentd_opensearch_password != '' -%}
       user {{ fluentd_opensearch_user }}
       password {{ fluentd_opensearch_password }}
{%- endif %}
       logstash_format true
       logstash_prefix {{ opensearch_log_index_prefix }}
       reconnect_on_error true
{% if match_pattern != 'retry_os' -%}
       retry_tag retry_os
{%- endif %}
       request_timeout {{ fluentd_opensearch_request_timeout }}
       suppress_type_name true
       bulk_message_request_threshold {{ fluentd_bulk_message_request_threshold }}
       <buffer>
         @type file
{% if match_pattern == 'retry_os' -%}
         path /var/lib/fluentd/data/opensearch.buffer/openstack_retry.*
{% else %}
         path /var/lib/fluentd/data/opensearch.buffer/openstack.*
{%- endif %}
         flush_interval 15s
         chunk_limit_size {{ fluentd_buffer_chunk_limit_size }}
       </buffer>
    </store>
</match>
{% endfor %}