How can i give two paths in the same input_type with different document_type?

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

I think you will need 2 different prospectors, like:

- 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

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

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

Best regards

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

Thanks

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