N
N
NaksRif2015-08-11 17:43:03
Ruby on Rails
NaksRif, 2015-08-11 17:43:03

How to set up the collection of different logs using Logstash from one file?

Good afternoon,
Please tell me how to configure logstash so that it takes logs from one file and splits them into different types (type:)?
Example.
There is a catalina.out file
. It contains several services:
tomcat-s1
tomcat-s2
tomcat-s3
How can I make it so that when entering any of the listed services into the search line, through the kibana web interface, it would display them as different types?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Demidenko, 2019-01-30
@Dem1

Put your array in an object and you will be happy

I
index0h, 2015-08-12
@index0h

It all depends on the format of the logs.
But in the basics: in the filter section, add a unique field to each of the log groups, for example server. Next, in the output section, write the type: document_type => "server-%{server}"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question