# Different index based on match keyword

**URL:** <https://discuss.elastic.co/t/different-index-based-on-match-keyword/155597>\
**Category:** Logstash\
**Created:** [November 6, 2018, 6:52pm UTC](https://discuss.elastic.co/t/different-index-based-on-match-keyword/155597 "2018-11-06T18:52:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrs](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@rrs](https://discuss.elastic.co/u/rrs)\
**Post date:** [November 6, 2018, 6:52pm UTC](https://discuss.elastic.co/t/different-index-based-on-match-keyword/155597/1 "2018-11-06T18:52:27Z")

</div>

Hi,

As per our architecture our application logs go into /custom\_path/app.log and some into /var/log/messages as well. Our ELK version is 5.6.3. We want ship the application logs store on above both files and segregate OS logs from /var/log/messages.

We require indexes to be created based on matched keyword, let say 'app-prod' has to matched from both /custom\_path/app.log and /var/log/messages.  
Any log that doesn't match 'app-prod' in /var/log/messages should create another index by 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:** [December 4, 2018, 6:52pm UTC](https://discuss.elastic.co/t/different-index-based-on-match-keyword/155597/2 "2018-12-04T18:52:30Z")

</div>

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