How can I write to different data streams for different kinesis input? We are trying to add fields in the inputs and use string interpolation in the outputs to no avail.
We had been using index+ilm_enabled in logstash, like this
In kinesis input:
add_field => { _meta_index => "api-events" }
in elasticsearch output:
index => "%{_meta_index}"
ilm_enabled => "true"
we are trying to migrate to using data streams, like this:
I don't think this is supported, there was a similar question about it, and it seems that the data_stream settings will not sprintf the value.
I do not use data streams, but from the elasticsearch output documentation there is a setting named data_stream_auto_routing that may help you achieve what you want.
From what I understand, you will need to set this to true and create the following fields.
data_stream.type, data_stream.dataset and data_stream.namespace, then if those fields exist in the event, they will be used instead of the settings.
I understand the general vibe that there is an opinionated solution, I just don't know what it is.
Would an Elasticsearch team member be able to post a specific, working example? The docs have various references to dot notation and [bracket] notation, and it's unclear what the exact correct format is
In Logstash when you want to work with a nested field, like data_stream.type, you need to refer to it as [data_stream][type], if you use data_stream.type in logstash, it is a reference to a field with a literal dot in its name.
In Elasticsearch and Kibana to refer to the same nested field you just use data_stream.type.
The [bracket][nested] is only used in Logstash, and this can be confusing some times.
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.