blob: dce2210807027ae528757e661f936bc1caa85390 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
{% for item in syslog_facilities | selectattr('enabled') %}
<match syslog.{{ item.facility }}.**>
@type copy
<store>
@type file
path /var/log/kolla/{{ item.logdir }}/{{ item.logfile }}
append true
# Disable timestamp in filename for logs
<buffer []>
path /var/log/kolla/{{ item.logdir }}/{{ item.logfile }}.*.buffer
</buffer>
<format>
output_tag {{ item.output_tag | default(false) | lower }}
output_time {{ item.output_time | default(false) | lower }}
</format>
</store>
{% if log_direct_to_elasticsearch %}
<store>
@type elasticsearch
host {{ elasticsearch_address }}
port {{ elasticsearch_port | default('9200') }}
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 }}
{% if fluentd_elasticsearch_cacert | length > 0 %}
ca_file {{ fluentd_elasticsearch_cacert }}
{% endif %}
{% endif %}
{% if fluentd_elasticsearch_user != '' and fluentd_elasticsearch_password != '' %}
user {{ fluentd_elasticsearch_user }}
password {{ fluentd_elasticsearch_password }}
{% endif %}
logstash_format true
logstash_prefix {{ opensearch_log_index_prefix }}
reconnect_on_error true
retry_tag retry_es
request_timeout {{ fluentd_elasticsearch_request_timeout }}
suppress_type_name true
bulk_message_request_threshold {{ fluentd_bulk_message_request_threshold }}
<buffer>
@type file
path /var/lib/fluentd/data/elasticsearch.buffer/{{ item.facility }}.*
flush_interval 15s
chunk_limit_size {{ fluentd_buffer_chunk_limit_size }}
</buffer>
</store>
{% elif log_direct_to_opensearch %}
<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_path != '' %}
path {{ fluentd_opensearch_path }}
{% endif %}
{% if fluentd_opensearch_scheme == 'https' %}
ssl_version {{ fluentd_opensearch_ssl_version }}
ssl_verify {{ fluentd_opensearch_ssl_verify }}
{% if fluentd_opensearch_cacert | length > 0 %}
ca_file {{ fluentd_opensearch_cacert }}
{% endif %}
{% endif %}
{% 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
retry_tag retry_os
request_timeout {{ fluentd_opensearch_request_timeout }}
suppress_type_name true
bulk_message_request_threshold {{ fluentd_bulk_message_request_threshold }}
<buffer>
@type file
path /var/lib/fluentd/data/opensearch.buffer/{{ item.facility }}.*
flush_interval 15s
chunk_limit_size {{ fluentd_buffer_chunk_limit_size }}
</buffer>
</store>
{% endif %}
</match>
{% endfor %}
|