# Hey, filebeat.inputs reads two log files. I am sending it to elasticsearch How can I show them in two different index names in kibana?

**URL:** https://discuss.elastic.co/t/hey-filebeat-inputs-reads-two-log-files-i-am-sending-it-to-elasticsearch-how-can-i-show-them-in-two-different-index-names-in-kibana/187841
**Category:** Beats
**Tags:** filebeat
**Created:** [June 27, 2019, 1:29pm UTC](https://discuss.elastic.co/t/hey-filebeat-inputs-reads-two-log-files-i-am-sending-it-to-elasticsearch-how-can-i-show-them-in-two-different-index-names-in-kibana/187841 "2019-06-27T13:29:34Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Evesy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/evesy/32/29520_2.png) [@Evesy](https://discuss.elastic.co/u/Evesy)
#### Post date: [June 27, 2019, 8:35pm UTC](https://discuss.elastic.co/t/hey-filebeat-inputs-reads-two-log-files-i-am-sending-it-to-elasticsearch-how-can-i-show-them-in-two-different-index-names-in-kibana/187841/2 "2019-06-27T20:35:38Z")

</div>

You can send to different indices based on any of the fields present in the document, so you could do something like the below:

```auto
output.elasticsearch:
  index: "default-%{+yyyy.MM.dd}"
  indices:
    - index: "application-one-%{+yyyy.MM.dd}"
      when.equals:
        application: "one"
    - index: "application-two-%{+yyyy.MM.dd}"
      when.equals:
        application: "two"

```

Would this work for you?

You can also cut out the middle man on the above and do something like:

```auto
output.elasticsearch:
  index: "%{[my-application-field]}-%{+yyyy.MM.dd}" 

```

---

_[View the full topic](https://discuss.elastic.co/t/hey-filebeat-inputs-reads-two-log-files-i-am-sending-it-to-elasticsearch-how-can-i-show-them-in-two-different-index-names-in-kibana/187841)._
