# Different index name for data from filebeat and packetbeat

**URL:** <https://discuss.elastic.co/t/different-index-name-for-data-from-filebeat-and-packetbeat/56768>\
**Category:** Logstash\
**Created:** [July 29, 2016, 8:00pm UTC](https://discuss.elastic.co/t/different-index-name-for-data-from-filebeat-and-packetbeat/56768 "2016-07-29T20:00:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh\_Jambhule](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Saurabh\_Jambhule](https://discuss.elastic.co/u/Saurabh_Jambhule)\
**Post date:** [July 29, 2016, 8:00pm UTC](https://discuss.elastic.co/t/different-index-name-for-data-from-filebeat-and-packetbeat/56768/1 "2016-07-29T20:00:48Z")

</div>

I have taken input from beats in logstash and now I want to forward it to the elasticsearch.  
In addition to this, I want to make sure that data from packetbeat and filebeat should have different index name in ES like,  
for filebeat: filebeat-\*  
for packetbeat: packetbeat-\*

Please tell me how to do this.  
Thank you!

---

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [July 29, 2016, 8:07pm UTC](https://discuss.elastic.co/t/different-index-name-for-data-from-filebeat-and-packetbeat/56768/2 "2016-07-29T20:07:49Z")

</div>

The ES output has a means of specifying the index.

output {  
elasticsearch {  
hosts =\> ["xxxxxxxxxxxx:9200"]  
index =\> dev-s3-new-%{+YYYY.MM.dd}"  
}  
stdout { codec =\> rubydebug }  
}

Create two separate file for packetbeat and filebeat. Well I believe filebeat and packetbeat have the expression be default as you have mentioned.

---

<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:** [July 6, 2017, 4:45am UTC](https://discuss.elastic.co/t/different-index-name-for-data-from-filebeat-and-packetbeat/56768/3 "2017-07-06T04:45:51Z")

</div>


