How to setup Kafka input in Logstash ? i have ELK setup and kafka installed in windows ? How can we create a logstash.config by mentioning kafka as input?

How to setup Kafka input in Logstash ? i have ELK setup and kafka installed in windows ? How can we create a logstash.config by mentioning kafka as input?
I just installed ELK and kafka in my windows system. My requirement is to consume the messages coming from the kafka topics by logstash. How can we create a logstash.config file for the same , can i get a sample config file for kafka as the input for logstast.

Have you looked at https://www.elastic.co/guide/en/logstash/5.6/plugins-inputs-kafka.html?

Also we’ve renamed ELK to the Elastic Stack, otherwise Beats feels left out :wink:

1 Like

I have gone through that , but am expecting the correct syntax like below for logstash.config

input{
file{
path => "D:\SOFTWARES\logstash-5.6.1\cars.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
csv{
separator => ","
columns => ["maker","model","mileage","manufacture_year","engine_displacement","engine_power","body_type","color_slug","stk_year","transmission","door_count","seat_count","fuel_type","date_created","date_last_seen","price_eur"]
}
mutate {convert => ["mileage","integer"]}
mutate {convert => ["price_eur","float"]}
mutate {convert => ["engine_power","integer"]}
mutate {convert => ["door_count","integer"]}
mutate {convert => ["seat_count","integer"]}
}
output{
elasticsearch{
hosts =>"localhost"
index =>"cars"
document_type =>"sold_cars"
user =>
password =>
}
stdout{
}

}

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