Dear,
I would like receive help to understand a behavior...
My infrastructure is Filebeat -> Logstash -> Elasticsearch -> Kibana
Filebeat:
We have many server send documents to Logstash using differents pipelines and specific ports.
Logstash:
We have 5 pipelines with differents ports.
In Logstash we need to use a IF by [TYPE] in Filter and Output blocks because without these IF all pipelines receive all documents sent by filebeat even using differents ports.
Logstash version is 5.1.2.
Exemple for Logstash and Filebeat configuration:
Logstash:
input {
beats {
port => "5005"
}
}
filter {
if [type] == "log_prod" {
json {
source => "message"
remove_field => [ "host", "beat", "message", "tags", "source", "input_type" ]
}
}
date {
timezone => "America/Sao_Paulo"
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
if [type] == "log_prod" {
elasticsearch {
hosts => ["server1:9200", "server2:9200"]
index=> "index-%{+YYYY.MM.dd}"
}
}
}
Filebeat:
filebeat.prospectors:
- input_type: log
paths: - /var/log/kibana_log/kibana.log
document_type: log_prod
scan_frequency: 30s
output:
logstash:
hosts: ["server_logstash:5005"]
logging:
to_syslog: false
to_files: true
files:
path: /var/log/filebeat
name: filebeat.log
keepfiles: 5
level: info