# How can i give two paths in the same input\_type with different document\_type?

**URL:** <https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 12, 2017, 6:30pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091 "2017-06-12T18:30:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 12, 2017, 6:30pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/1 "2017-06-12T18:30:54Z")

</div>

Hi,

How can i give two paths in one input\_type with different document\_type for each path. I tried it by giving like this:

```
- input_type: log
  paths:
    - F:\logstash-2.4.0\logstash-2.4.0\bin\samp.txt
  document_type: exceptions
    - F:\logstash-2.4.0\logstash-2.4.0\bin\slowlog.txt
  document_type: slowlogs 

```

But filebeat 5.3.1 is only taking the second one all the two paths which i checked in logstash by giving `stdout`

Thanks

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [June 12, 2017, 7:44pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/2 "2017-06-12T19:44:40Z")

</div>

I think you will need 2 different prospectors, like:

```auto
- input_type: log
  paths: 
    - F:\logstash-2.4.0\logstash-2.4.0\bin\samp.txt
  document_type: exceptions

- input_type: log
  paths:
    - F:\logstash-2.4.0\logstash-2.4.0\bin\slowlog.txt
  document_type: slowlog

```

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 12, 2017, 7:49pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/3 "2017-06-12T19:49:42Z")

</div>

Thanks @exekias

Basically i have two logs in which only for one i need to apply multiline codec but if i enabled in multiline codec in filebeat it will use it for all the paths that i had mentioned in the prospectors because of this i am not getting proper output.

THANKS

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [June 12, 2017, 7:52pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/4 "2017-06-12T19:52:18Z")

</div>

I understand that solves your multiline issue too, feel free to mark it as solution if that's the case 🙂

Best regards

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 12, 2017, 7:55pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/5 "2017-06-12T19:55:45Z")

</div>

> [@exekias](#):
>
> I understand that solves your multiline issue too

Sry.. I dont think the solution which you had given solves the multicodec one .But you given solution for the my first response.

Thanks

---

<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:** [July 10, 2017, 7:55pm UTC](https://discuss.elastic.co/t/how-can-i-give-two-paths-in-the-same-input-type-with-different-document-type/89091/6 "2017-07-10T19:55:52Z")

</div>

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