Hello all,
I'm currently trying to create a data stream with a corresponding ILM policy enabled, and then have Logstash to forward logs to that data stream.
It seems that you want to create a custom data stream named header_stream, the issue here is that logstash does not support natively the creation of custom data streams.
Logstash only creates datastreams that follows the default name pattern, which is something like logs-<dataset>-<namespace>, which you can confirm since the data stream logs-header_stream-development was created.
There is a workaround to be able to create custom data streams, you basically set data_stream to false, put the name of the data stream rollover alias in the index option and set the action to create.
I am having the same issue when I configure logstash to create the datastream, it default to use "log" template and "log" ILM.
with the suggestion you provided, I will need to create the datasream manually right? I still not sure how it will use the data_stream if data_stream is set to true in logstash's ES output?
Then you use an output like the one I suggested, with data_stream => false.
If you set data_stream as true in the Logstash Elasticsearch output, your datastream name will need to be something like logs-dataset-namespace and it will use the logs template and log ILM.
As mentioned in my previous answer logstash does not support custom data streams, the only way to write to custom data streams with different name patterns is with the workaround shared.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.