# Multiple files from beats to logstash

**URL:** https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966
**Category:** Beats
**Tags:** filebeat
**Created:** [December 4, 2016, 11:31pm UTC](https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966 "2016-12-04T23:31:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bob-bza](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@bob-bza](https://discuss.elastic.co/u/bob-bza)
#### Post date: [December 4, 2016, 11:31pm UTC](https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966/1 "2016-12-04T23:31:30Z")

</div>

i have multiple files i was trying to index all those with different index's , i was wondering how can i manage those.  
filebeat i was forwarding to logstash and then output to elastic search.  
Example:  
/var/log/file1  
/var/log/file2  
.  
.  
.  
/var/log/filen

---

<div class="post-metadata">

### Author: ![bob-bza](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@bob-bza](https://discuss.elastic.co/u/bob-bza)
#### Post date: [December 4, 2016, 11:35pm UTC](https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966/2 "2016-12-04T23:35:45Z")

</div>

i was not sure where i have to tag to filebeat or logstash so , i posted in both forums

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [December 5, 2016, 3:38pm UTC](https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966/3 "2016-12-05T15:38:30Z")

</div>

you can compute a field in LS and store it for example in `[@metadata][index]` . Use the field to configure the index (see filebeat -\> LS getting started docs for example ES output config). This way you don't have to tag and filter (if-else) things like crazy.

All fields stored under `@metadata` will be ignored when indexing to ES.

---

<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: [January 2, 2017, 3:39pm UTC](https://discuss.elastic.co/t/multiple-files-from-beats-to-logstash/67966/4 "2017-01-02T15:39:09Z")

</div>

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