# Need 4 different Indexes in ElasticSearch for 4 different logs file format using single Logstash instance

**URL:** <https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670>\
**Category:** Logstash\
**Created:** [May 5, 2017, 7:58am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670 "2017-05-05T07:58:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [May 5, 2017, 7:58am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670/1 "2017-05-05T07:58:36Z")

</div>

I have 4 log files from 4 completely different applications  
For e.g. Log A, B, C, D

The log format of A AND B is same and  
The log format of A, C, and D is different

Source of reading log A, B and C is filebeat =\> Logstash  
And Source of reading D is UDP =\> Logstash

I want to create 4 different Indexes in ElasticSearch and would prefer to have 4 different pipelines to keep all the configuration separate

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 5, 2017, 8:02am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670/2 "2017-05-05T08:02:37Z")

</div>

I'm not sure what you're asking.

> I want to create 4 different Indexes in Elasticsearch

Why? Keep in mind that all shards have a fixed memory overhead so splitting your indexes in too many pieces isn't free.

> and would prefer to have 4 different pipelines to keep all the configuration separate

Then just run four Logstash instances.

---

<div class="post-metadata">

**Author:** ![hasan\_sharekhan](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hasan\_sharekhan](https://discuss.elastic.co/u/hasan_sharekhan)\
**Post date:** [May 5, 2017, 8:15am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670/3 "2017-05-05T08:15:50Z")

</div>

I/We need 4 different indexes as all 4 logs belongs to completely different applications  
and we dont prefer to run/maintain multiple instance of Logstash as of now.  
Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 5, 2017, 8:26am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670/4 "2017-05-05T08:26:19Z")

</div>

In that case [http://stackoverflow.com/questions/27146032/make-logstash-add-different-inputs-to-different-indices](http://stackoverflow.com/questions/27146032/make-logstash-add-different-inputs-to-different-indices) should answer your question.

---

<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:** [June 2, 2017, 8:30am UTC](https://discuss.elastic.co/t/need-4-different-indexes-in-elasticsearch-for-4-different-logs-file-format-using-single-logstash-instance/84670/5 "2017-06-02T08:30:52Z")

</div>

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