Kafka Input plugin not working in Logstash 5.4.1


I am a Novice and I am trying to use a Kafka stream as input for Logstash and load it to Elastic. One major doubt i am having is, If we use Kafka as source, where will the data be stored? (As per my understanding ES stores only the indexes).

The next thing is my Logstash keeps listening to Kafka input and doesn't give out any output. Below is my config file. I use ES & Logstash 5.4.1, kafka_2.12- & zookeeper-3.4.10

input {
kafka {
bootstrap_servers => "localhost:2181"
topics => ["test"]
output {
elasticsearch {
action => "index"
hosts => [ "localhost:9200" ]
index => "kafkatest"
stdout {}

Kindly help me index the kafka stream to ES.


I figured out the issue. I was trying to connect to Zookeeper instead of Kafka Broker. I replaced localhost:2181 (Default Zookeeper instance) with localhost:9092 (Default Kafka Broker instance) and that did the trick for me.

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