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

Template setting in the configuration file #4284

Merged
merged 1 commit into from
May 11, 2017

Conversation

tsg
Copy link
Contributor

@tsg tsg commented May 10, 2017

This allows adding and overwriting index/template settings via the
configuration file.

Example config:

setup.template.settings:
  index.number_of_shards: 1
  index.number_of_replicas: 1

Needed for #4112.

ToDOs:

  • Integration tests
  • Test with ES 2.x
  • Docs update
  • Changelog

@tsg tsg added in progress Pull request is currently in progress. review labels May 10, 2017
Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a changelog entry?

"refresh_interval": "5s",
"mapping": common.MapStr{
"total_fields": common.MapStr{
"limit": defaultTotalFieldsLimit,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on all ES versions down to 2.x?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ES 2.x will just ignore the setting, but I'm going to test it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested, seems to work well.

Fields string `config:"fields"`
Overwrite bool `config:"overwrite"`
OutputToFile string `config:"output_to_file"`
Settings map[string]interface{} `config:"settings"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on using a "generic" approach

@ruflin
Copy link
Member

ruflin commented May 10, 2017

Part of #3654

@tsg tsg removed the in progress Pull request is currently in progress. label May 11, 2017
@tsg tsg force-pushed the template_settings branch from 3451349 to e0b856d Compare May 11, 2017 10:01
This allows adding and overwriting index/template settings via the
configuration file.

Example config:

    setup.template.settings:
      index.number_of_shards: 1
      index.number_of_replicas: 1

Needed for elastic#4112, part of elastic#3654.
@tsg tsg force-pushed the template_settings branch from e0b856d to 5bcd42e Compare May 11, 2017 11:36
@ruflin ruflin added the libbeat label May 11, 2017
@ruflin ruflin merged commit 6559fde into elastic:master May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants