Hello,
can someone shed some light into configuration of logstash/data streams?
I have a bunch of apps (kubernetes pods) and I need to store logs of some for one year and the rest just for one week. I found out that by setting %{data_stream.type}, %{data_stream.dataset}, %{data_stream.namespace} fields I can select the name of the data stream to route the logs to.
So I need to have at least two data streams: one with one week log retention and one with one year retention.
Now how would I define the properties of the data streams on Elasticsearch side? As per documentation the data stream requires some index template. WTF? So what would I use as index pattern and why? In the Logstash configuration I do not specify (I even CAN'T) the index(es) the logs would be routed to. When I specify index => '....' in the output section together with data_stream => 'true' Logstash won't even start due to configuration error complaining about the index being specified.