-
Notifications
You must be signed in to change notification settings - Fork 306
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
[Doc] Logstash data streams integration #966
Comments
This is really awesome! Thank you for the walkthrough! Is the goal to eventually support variable interpolation in the It's probably still too early to tell, but I figured I'd ask to gauge if it's worth implementing the data streams approach for now on our end. |
Yes! Good stuff, @ppf2. Adding this to work in queue. Thanks for taking time to share this info with other users. |
I think the long term plan is for the output to have actual data stream settings (so that we don't have to deal with the unintuitive setup here, turning ILM off and switching index option to create, etc..). This will certainly require a code change so I will have the LS devs comment here :) |
@colinsurprenant FYI: Calling your attention to this issue as it relates to our docs work on datastreams. |
Great stuff @ppf2 - FYI we are currently working on the design and implementation strategy for a new data streams output plugin which will be essentially a stripped down version of the current elasticsearch output, see elastic/logstash#12178. Please let us know if you have any feedback/comments etc! |
going to close this issue as elastic/logstash#12178 got shipped, let us know if there's anything more we need to do (e.g. in the docs) |
Data streams, a convenient, scalable way to ingest, search, and manage continuously generated time series data, was released in Elasticsearch 7.9.
While this feature is currently available in the default distribution of Elasticsearch, Logstash has not yet adopted it in its time-series indexing implementation.
The following walks you through how you can implement data streams integration with Logstash.
Using this recipe allows you to more easily workaround the well-known limitation in using dynamic variables with ILM+rollover in Logstash until more out of the box integration is available between Logstash and data streams.
Disclaimer: Keep in mind that Elasticsearch data streams only support create action today. If a document with the specified
_id
already exists, the indexing operation will fail (by design).Step 1: Create the desired ILM policy in Elasticsearch (you can use either the API or Kibana UI):
Step 2: Create an index template using v2 templates (you can use either the API or Kibana UI). "v2 templates" refer to the new _index_template implementation in Elasticsearch.
(Optional) You can also create multiple index templates for each "type" of index/app if desired, e.g.,
(Optional) If you are running hot-warm architecture, make sure to include the
index.routing.allocation.require
setting in the index templates so that it will place new data stream indices in the hot tier by default. The following is an example for the hot-warm deployment template on Elastic Cloud.Step 3: Configure Logstash Elasticsearch output
Example below assumes that the variable
%{app_name}
is already defined/populated to each event upstream from the output.As Logstash substitutes the field variable
%{app_name}
with its value in the event set upstream from the output, it will match the index template defined in Step 2. As a result, the underlying data stream for each "application type" will automatically be created.Example of resulting backing indices (with rollover) of the data streams created for each "application type""
The text was updated successfully, but these errors were encountered: