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

Beats template autoload only functioning if elasticsearch available on start #1321

Closed
urso opened this issue Apr 5, 2016 · 0 comments · Fixed by #1538
Closed

Beats template autoload only functioning if elasticsearch available on start #1321

urso opened this issue Apr 5, 2016 · 0 comments · Fixed by #1538
Labels

Comments

@urso
Copy link

urso commented Apr 5, 2016

elasticsearch template autoloading will not happen if elasticsearch is not available on startup.

For confirmed bugs, please report:

  • Version: 5.0.0-alpha1
  • Operating System: any
  • Steps to Reproduce:
    • stop elasticsearch (not having template/mapping/index for topbeat)
    • start topbeat
    • start elasticsearch
    • check topbeat index available via curl http://localhost:9200/_cat/indices?v
    • check topbeat template available via http://localhost:9200/_template/topbeat?pretty
tsg pushed a commit to tsg/beats that referenced this issue Apr 18, 2016
It used to try loading it only once on init, causing bug elastic#1321.
This change moves the call to loadTemplate at connection time, immediately
after successful connection. This has the effect that if overwrite is true,
the template will be loaded on each new established connection.

The template is read on init time and sent to Elasticsearch at connect time.
This means that if the template path is wrong, it will be discovered at
startup (including `-configtest`).

In case there is an error loading the template, the Connect call fails.

This commit includes an integration test for the behaviour.
ruflin pushed a commit that referenced this issue Apr 19, 2016
It used to try loading it only once on init, causing bug #1321.
This change moves the call to loadTemplate at connection time, immediately
after successful connection. This has the effect that if overwrite is true,
the template will be loaded on each new established connection.

The template is read on init time and sent to Elasticsearch at connect time.
This means that if the template path is wrong, it will be discovered at
startup (including `-configtest`).

In case there is an error loading the template, the Connect call fails.

This commit includes an integration test for the behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants