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

Cannot apply index template when using custom index name #4724

Closed
andrewkroh opened this issue Jul 20, 2017 · 1 comment
Closed

Cannot apply index template when using custom index name #4724

andrewkroh opened this issue Jul 20, 2017 · 1 comment
Labels
bug discuss Issue needs further discussion. v6.0.0-beta1

Comments

@andrewkroh
Copy link
Member

If I customize my index name the template does not apply to that index. The generated index template always is applied to $index-$version-* and $index is configurable via setup.template.settings.index.name.

  • Version: 6.0
  • Operating System: all
  • Steps to Reproduce:
    • Customize the index pattern (output.elasticsearch.index). For example I customized my index to somebeat-%{+xxxx.ww} for weekly indices.
    • Install the index template (somebeat setup).
    • Start the beat and the index template will not be applied to your data.
    • GET _template/somebeat* and you will see that the template applies to somebeat-6.0.0-beta1-*.

So there are a few options:

  1. Require the user to use a output.elasticsearch.index value that is compatible with the template. This means erroring out when the two don't match up.
  2. Allow customization of the pattern used in the template.
  3. Do nothing. This affected me when upgrading from 5.x to 6.x so I imagine it will affect others. I can workaround the issue by including %{[beat.version]} in index name, but this won't work for everyone.
@andrewkroh
Copy link
Member Author

This has been fixed. An example config would be:

setup.template:
  name:    "filebeat-%{[beat.version]}"
  pattern: "filebeat-%{[beat.version]}-*"

output.elasticsearch.index: "filebeat-%{[beat.version]}-%{+xxxx.ww}"
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug discuss Issue needs further discussion. v6.0.0-beta1
Projects
None yet
Development

No branches or pull requests

2 participants