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

Configurable Elasticsearch index pattern #2119

Merged
merged 1 commit into from
Aug 3, 2016

Conversation

urso
Copy link

@urso urso commented Jul 28, 2016

Part of #2074
Depends on #2118

Implement index selector based on selector support provided by #2087 and new format string support.

Default index pattern changes to beatname-%{+yyyy.MM.dd}.

More advanced index selection via selector:

output.elasticsearch.indices:
- rule1
- rule2

If output.elasticsearch.indices doesn't match, default case in output.elasticsearch.index is used (which is always set to default value on init).

Rules are similar to #2064 with supported keywords: index, default, mapping, when.

@urso urso added in progress Pull request is currently in progress. blocked review labels Jul 28, 2016
@tsg
Copy link
Contributor

tsg commented Jul 29, 2016

LGTM. I think this will require some changes in docs & changelog.

@urso urso force-pushed the enh/es-index-config branch from f1d6788 to 6acacda Compare July 29, 2016 12:26
@urso
Copy link
Author

urso commented Jul 29, 2016

Yes, requires updates to docs. With change being quite complex and format strings being new I'd like to add some doc on config file format and supported 'types' in config file first.

For example:

@urso urso force-pushed the enh/es-index-config branch from 6acacda to 11056ae Compare August 1, 2016 21:53
@urso urso removed blocked in progress Pull request is currently in progress. labels Aug 1, 2016
@tsg tsg mentioned this pull request Aug 1, 2016
5 tasks
@ruflin
Copy link
Contributor

ruflin commented Aug 2, 2016

Should we change as part of this also our default config file? https://github.com/elastic/beats/blob/master/filebeat/filebeat.full.yml#L337 What I have in mind is that if someone upgrades to 5.0 the default in the config file is still the same as before. Also uncommenting should have the same affect as the default we use.

@urso
Copy link
Author

urso commented Aug 2, 2016

@ruflin my bad working on too many branches in parallel. Default config should be updated in this PR.

Update elasticsearch index configuration to support format strings to fully
configure the index names to be used.

The default index is `<beatname>-%{+yyyy.MM.dd}` basically mimicing the old
behavior of `output.elasticsearch.index`.

More complex index selection rules can be configured via
`output.elasticsearch.indices`. Implementation is based on outil.Select
support.
@urso urso force-pushed the enh/es-index-config branch from 11056ae to 373a978 Compare August 2, 2016 10:29
@urso
Copy link
Author

urso commented Aug 2, 2016

full config files have been updated.

@tsg tsg merged commit 7ee94d2 into elastic:master Aug 3, 2016
@urso urso deleted the enh/es-index-config branch February 19, 2019 18:37
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 this pull request may close these issues.

3 participants