aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/fluentd/templates/conf/output/03-opensearch.conf.j2
blob: dd5f384192a2746618e41d208c35fa539a8893c8 (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 {% if opensearch_address is defined and opensearch_address != kolla_internal_fqdn %}{{ opensearch_address }}{% else %}{% for host in groups['opensearch'] %}{{ 'api' | kolla_address(host) }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
       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 %}