fluentd
fluentd copied to clipboard
fluentd not sending data to elasticsearch while using the same template name
I have the fllowing configuration file for fluentd that contains:
<match docker.env1.**>
@type copy
<store>
@type elasticsearch
host es-host
port 9200
index_name .kibana_env1
logstash_dateformat %Y%m%d
type_name forever
time_key @timestamp
resurrect_after 5
flush_interval 1s
template_name template1
template_file /fluentd/etc/template.json
template_overwrite true
</store>
<store>
@type stdout
</store>
</match>
<match docker.env2.**>
@type copy
<store>
@type elasticsearch
host es-host
port 9200
index_name .kibana_env2
logstash_dateformat %Y%m%d
type_name forever
time_key @timestamp
resurrect_after 5
flush_interval 1s
template_name template1
template_file /fluentd/etc/template.json
template_overwrite true
</store>
<store>
@type stdout
</store>
</match>
while using template_name template1 for both blocks, nothing seems to be sent to elasticsearch, but when I've changed them to different names:
template_name template1 for the first match and template_name template2 for the second match, it seems that it worked and fluentd sends data to elasticsearch.
I was wondering if this is a normal behavior or no?
This seems fluent-plugin-elasticsearch issue, not fluentd.