# 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?

**URL:** <https://discuss.elastic.co/t/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/101937>\
**Category:** Logstash\
**Created:** [September 27, 2017, 7:19am UTC](https://discuss.elastic.co/t/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/101937 "2017-09-27T07:19:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manu\_john](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@manu\_john](https://discuss.elastic.co/u/manu_john)\
**Post date:** [September 27, 2017, 7:19am UTC](https://discuss.elastic.co/t/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/101937/1 "2017-09-27T07:19:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 27, 2017, 8:03am UTC](https://discuss.elastic.co/t/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/101937/2 "2017-09-27T08:03:02Z")

</div>

Have you looked at [https://www.elastic.co/guide/en/logstash/5.6/plugins-inputs-kafka.html](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 😉

---

<div class="post-metadata">

**Author:** ![manu\_john](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@manu\_john](https://discuss.elastic.co/u/manu_john)\
**Post date:** [September 27, 2017, 8:56am UTC](https://discuss.elastic.co/t/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/101937/3 "2017-09-27T08:56:30Z")

</div>

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{  
}

}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2017, 8:56am UTC](https://discuss.elastic.co/t/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/101937/4 "2017-10-25T08:56:41Z")

</div>

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