Skip to content
Snippets Groups Projects
Commit c898af91 authored by jurgenhaas's avatar jurgenhaas
Browse files

Use different buffers for elasticsearch and openobserve

parent c37092fb
Branches main
No related tags found
No related merge requests found
...@@ -292,6 +292,12 @@ ...@@ -292,6 +292,12 @@
{% if appl.plugin|default('elasticsearch') == 'elasticsearch' %} {% if appl.plugin|default('elasticsearch') == 'elasticsearch' %}
reconnect_on_error true reconnect_on_error true
{% endif %} {% endif %}
<buffer>
@type file
path /var/log/td-agent/buffer/{{ appl.index }}.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -307,16 +313,16 @@ ...@@ -307,16 +313,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/{{ appl.index }}.*.buffer path /var/log/td-agent/buffer/oo_{{ appl.index }}.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
...@@ -338,6 +344,13 @@ ...@@ -338,6 +344,13 @@
index_name ansible index_name ansible
type_name ansible type_name ansible
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/ansible.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -353,17 +366,16 @@ ...@@ -353,17 +366,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/ansible.*.buffer path /var/log/td-agent/buffer/oo_ansible.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
<match app.uptime.ping> <match app.uptime.ping>
...@@ -382,6 +394,13 @@ ...@@ -382,6 +394,13 @@
index_name uptime index_name uptime
type_name ping type_name ping
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/uptime.ping.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -397,17 +416,16 @@ ...@@ -397,17 +416,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/uptime.ping.*.buffer path /var/log/td-agent/buffer/oo_uptime.ping.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
<match haproxy.*> <match haproxy.*>
...@@ -426,6 +444,13 @@ ...@@ -426,6 +444,13 @@
index_name haproxy index_name haproxy
type_name haproxy type_name haproxy
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/haproxy.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -441,17 +466,16 @@ ...@@ -441,17 +466,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/haproxy.*.buffer path /var/log/td-agent/buffer/oo_haproxy.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
<match *beat> <match *beat>
...@@ -471,6 +495,13 @@ ...@@ -471,6 +495,13 @@
include_tag_key true include_tag_key true
tag_key @log_name tag_key @log_name
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/beats.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -486,17 +517,16 @@ ...@@ -486,17 +517,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/beats.*.buffer path /var/log/td-agent/buffer/oo_beats.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
<match netdata> <match netdata>
...@@ -515,6 +545,16 @@ ...@@ -515,6 +545,16 @@
index_name netdata index_name netdata
type_name netdata type_name netdata
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/netdata.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
<format>
@type json
</format>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -530,20 +570,19 @@ ...@@ -530,20 +570,19 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/netdata.*.buffer path /var/log/td-agent/buffer/oo_netdata.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
<format> <format>
@type json @type json
</format> </format>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
<match **> <match **>
...@@ -563,6 +602,13 @@ ...@@ -563,6 +602,13 @@
index_name fluentd index_name fluentd
type_name fluentd type_name fluentd
reconnect_on_error true reconnect_on_error true
<buffer>
@type file
path /var/log/td-agent/buffer/default.*.buffer
flush_at_shutdown true
flush_thread_count 8
</buffer>
request_timeout 15s
{% endif %} {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %} {% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store> </store>
...@@ -578,17 +624,16 @@ ...@@ -578,17 +624,16 @@
username {{ fluentd_openobserve_backend.username }} username {{ fluentd_openobserve_backend.username }}
password {{ fluentd_openobserve_backend.password }} password {{ fluentd_openobserve_backend.password }}
</auth> </auth>
{% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
<buffer> <buffer>
@type file @type file
path /var/log/td-agent/buffer/default.*.buffer path /var/log/td-agent/buffer/oo_default.*.buffer
flush_at_shutdown true flush_at_shutdown true
flush_thread_count 8 flush_thread_count 8
</buffer> </buffer>
request_timeout 15s {% endif %}
{% if elasticsearch_install|default('yes') and fluentd_openobserve_backend is defined %}
</store>
{% endif %}
</match> </match>
{% else %} {% else %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment