# Best practice for using file beats and indexing

**URL:** https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599
**Category:** Beats
**Tags:** filebeat
**Created:** [March 19, 2018, 3:35pm UTC](https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599 "2018-03-19T15:35:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Gidony](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@David\_Gidony](https://discuss.elastic.co/u/David_Gidony)
#### Post date: [March 19, 2018, 3:35pm UTC](https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599/1 "2018-03-19T15:35:15Z")

</div>

hi,  
i configed beats to read log files from a certain dir and output it to logstash,  
in logstash i have a config that listens to beats , do some filtering and outputs to elastic search.  
the index name is dynamically generated from the file name filebeat was reading.

i have all sorts of issues, since i dont have any index ready for this log type,  
what is the best practice for creating an index and then make all the new indexes use it ...  
please help,  
thanks,  
david

---

<div class="post-metadata">

### Author: ![Bkt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkt/32/48260_2.png) [@Bkt](https://discuss.elastic.co/u/Bkt)
#### Post date: [March 19, 2018, 11:43pm UTC](https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599/2 "2018-03-19T23:43:27Z")

</div>

this should work as I have a setup very similar to what you described, the index is dynamic. Can you post some issues which you are facing?

---

<div class="post-metadata">

### Author: ![Arpit\_Gulati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arpit_gulati/32/48349_2.png) [@Arpit\_Gulati](https://discuss.elastic.co/u/Arpit_Gulati)
#### Post date: [March 20, 2018, 10:35am UTC](https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599/3 "2018-03-20T10:35:38Z")

</div>

Can you post the logs of filebeat and logstash?

---

<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: [April 17, 2018, 10:35am UTC](https://discuss.elastic.co/t/best-practice-for-using-file-beats-and-indexing/124599/4 "2018-04-17T10:35:38Z")

</div>

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