-
Notifications
You must be signed in to change notification settings - Fork 41
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
[feature request] index name logstash pattern. #2
Comments
Thanks for the suggestion, indeed, I haven't had such a use case, but it looks interesting. If I understand correctly, a single file's records should end up in different indices, based on a certain property of the record. I'm not sure yet, whether this is a genuine fast indexing use case or more a preprocessing thing (split input file on correct boundaries, then index). Let me think about it. |
@miku Thanks for the response.
I agree that bulk processing's first goal is fast indexing.
Also I have considered do some preprocessing to split to individual date's file. but as I have to do that every day, it is a little burdened. Cheers, |
Just a quick update: I implemented a first version of dynamic date support - here's a short screencast. For a given file like this:
One can use the golang-style date spec to set a date field and a date field layout:
The result would be three indices: test-2016-05-01, test-2016-05-02, test-2016-05-03 with one document each. Another example:
The result would be two indices: test-2016-05-29 and 2016-05-30, due to conversion to UTC. Just a few points, that make this feature kind of difficult, at least with the current overall implementation:
Here's another screencast, showing UTC conversion. The code for all this is in https://github.com/miku/esbulk/tree/issue-1, feel free to check it out and test it. I am still a bit hesitant to include this, but if you think it would be useful, I will certainly consider it. |
I'm afraid I cannot implement this at the moment. It would add yet another two flags and I cannot think of an easy way to support this for now. |
@miku thank you for the feedback! |
For the sake of completeness: There is a processor type, that can route documents based on date:
|
Hello.
Thanks for develop such a cool utility.
I have moved from logstash to this esbulk.
Btw, I have a small leak of function with this utility.
We usually have log files which contains date field. and we create index with logstash index pattern. (e.g logstash-2016.05.30)
But In some(or many) case dates of single file can be spreaded over several days, particularly local date based rolling strategy forced.
For example
event_20160530.json may have these lines
However, elasticsearch and kibana forces UTC convert.
So log 1 have to logstash-2016.05.29 and log 2 have to logstash-2016.05.30.
I know it is not a simple problem.
But could you please consider feature something like this?
The text was updated successfully, but these errors were encountered: