# Using filename from filebeat in index pattern

**URL:** https://discuss.elastic.co/t/using-filename-from-filebeat-in-index-pattern/61602
**Category:** Beats
**Tags:** filebeat
**Created:** [September 27, 2016, 11:52am UTC](https://discuss.elastic.co/t/using-filename-from-filebeat-in-index-pattern/61602 "2016-09-27T11:52:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Anubhav\_Bimbisariye](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anubhav_bimbisariye/32/12178_2.png) [@Anubhav\_Bimbisariye](https://discuss.elastic.co/u/Anubhav_Bimbisariye)
#### Post date: [September 27, 2016, 11:52am UTC](https://discuss.elastic.co/t/using-filename-from-filebeat-in-index-pattern/61602/1 "2016-09-27T11:52:16Z")

</div>

paths:  
- /var/log/\*.log  
The output is elasticsearch. the logs are already formatted in json, I just want index to reflect where the logs come from. In my scenario, anyone may put a file abcd.log in the logs folder. I want these logs to be sent to index abcd-19.05.2016 or something like that. Since the logs are preformatted, we dont want any logstash in between.

---

<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: [September 29, 2016, 9:52am UTC](https://discuss.elastic.co/t/using-filename-from-filebeat-in-index-pattern/61602/2 "2016-09-29T09:52:16Z")

</div>

In filebeat beta1 you have some more control over configuring the index using [format strings and conditionals](https://www.elastic.co/guide/en/beats/filebeat/master/elasticsearch-output.html#_index). But there is no way in parsing and munging/changing any field to your likings. I wonder of ingest node support in ES can be used to do the manipulations required. As far as I know, ingest node allows changing an events index.

One can set additonal hints in prospectors by adding custom fields/tags per prospector.

---

<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 18, 2016, 11:52am UTC](https://discuss.elastic.co/t/using-filename-from-filebeat-in-index-pattern/61602/3 "2016-10-18T11:52:32Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
