-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
LGTM. I think this will require some changes in docs & changelog. |
f1d6788
to
6acacda
Compare
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: |
6acacda
to
11056ae
Compare
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. |
@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.
11056ae
to
373a978
Compare
full config files have been updated. |
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:
If
output.elasticsearch.indices
doesn't match, default case inoutput.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
.