# How to write to the same datastream from MetricBeat and Logstash

**URL:** <https://discuss.elastic.co/t/how-to-write-to-the-same-datastream-from-metricbeat-and-logstash/347778>\
**Category:** Logstash\
**Tags:** datastreams\
**Created:** [November 22, 2023, 5:26pm UTC](https://discuss.elastic.co/t/how-to-write-to-the-same-datastream-from-metricbeat-and-logstash/347778 "2023-11-22T17:26:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igal\_Hanoch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igal_hanoch/32/127936_2.png) [@Igal\_Hanoch](https://discuss.elastic.co/u/Igal_Hanoch)\
**Post date:** [November 22, 2023, 5:26pm UTC](https://discuss.elastic.co/t/how-to-write-to-the-same-datastream-from-metricbeat-and-logstash/347778/1 "2023-11-22T17:26:18Z")

</div>

I'm writing metricbeat data from several computes to my elasticsearch.  
Some metricbeats are writing directly to ElasicSearch and some through logstash.  
The data from the metricbeat is written to a datastream named .ds-metricbeat-8.7.1-2023.11.20-000004  
2023.11.20 was two days ago and I'm not sure when I'll get a new datastream  
I was trying to get Logstash to write to the same datastream as metricbeat  
How do I make Logstash do that.  
The closest I got was .ds-metrics-metricbeat-8.7.1-2023.11.22-000001

---

<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:** [December 20, 2023, 5:26pm UTC](https://discuss.elastic.co/t/how-to-write-to-the-same-datastream-from-metricbeat-and-logstash/347778/2 "2023-12-20T17:26:29Z")

</div>

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