Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluentd not sending data to elasticsearch while using the same template name #416

Open
hichamuntitled opened this issue May 2, 2018 · 3 comments

Comments

@hichamuntitled
Copy link

hichamuntitled commented May 2, 2018

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?

Using Fluentd and ES plugin versions
fluentd:v0.12-debian
ES plugin1.9.5
ES version 5.5.1

@cosmo0920
Copy link
Collaborator

I conldn't reproduce without docker environment.
Docker environment is needed to reproduce?

@hichamuntitled
Copy link
Author

Yes docker environment is needed.

@kumaravel29
Copy link
Contributor

@hichamuntitled
Is the index being generated for both the blocks when template name is same?
Also can you set the log_level to debug or trace and check the logs?
What is the content of template.json?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants