I am trying to consume logs from Kafka with Logstash and forward them to ES.
I can see Kafka receives logs from Filebeat but Logstash is not able to consume them, though there are no any errors neither in Kafka nor in Logstash logs.
Can anyone explain what is wrong please?
These are config files:
filebeat.yml:
filebeat.prospectors:
- input_type: log
paths:
- /var/log/sample.log
registry_file: /var/lib/filebeat/registry
output.kafka:
hosts: ["broker_server:9092"]
topic: 'logstash'
logstash.conf:
input {
kafka {
bootstrap_servers => "broker_server:9092"
topics => ["logstash"]
codec => "json"
}
}
filter {
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
}
}