# Logstash and filebeat data streams

**URL:** <https://discuss.elastic.co/t/logstash-and-filebeat-data-streams/314488>\
**Category:** Logstash\
**Created:** [September 15, 2022, 9:17am UTC](https://discuss.elastic.co/t/logstash-and-filebeat-data-streams/314488 "2022-09-15T09:17:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gborg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gborg/32/58934_2.png) [@gborg](https://discuss.elastic.co/u/gborg)\
**Post date:** [September 15, 2022, 9:17am UTC](https://discuss.elastic.co/t/logstash-and-filebeat-data-streams/314488/1 "2022-09-15T09:17:31Z")

</div>

Hello

I have a setup where I run filebeats, which send their logs to a queue, logstash reads off the queue and writes the data to elasticsearch.

With version 7 I had no issues, I recently upgraded to elasticsearch to elasticsearch 8 and was going to start updating the beats, where I ran into a problem

The default behaviours of beats (when connected directly to elasticsearch) is to write to the datastram "%{beat-name}-%{beat-version", "filebeat-8.4.1" for example

And i want to use the standard datastream format with my beats data but I can't since the logstash output only supports writing datastreams in the "%{type}-%{dataset}-%{namespace}" format, "logs-default-generic" for example

How can I use logstash and the standard datastreams together ?

---

<div class="post-metadata">

**Author:** ![gborg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gborg/32/58934_2.png) [@gborg](https://discuss.elastic.co/u/gborg)\
**Post date:** [September 15, 2022, 1:24pm UTC](https://discuss.elastic.co/t/logstash-and-filebeat-data-streams/314488/2 "2022-09-15T13:24:35Z")

</div>

I mangaged to solve it

by not setting the elasticsearch output as a datastream, specifying the action and the index name

```auto
 elasticsearch {
                        [.....]
                        action => "create"
                        index => "%{[@metadata][beat]}-%{[@metadata][version]}"
 }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 13, 2022, 1:25pm UTC](https://discuss.elastic.co/t/logstash-and-filebeat-data-streams/314488/3 "2022-10-13T13:25:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
