# Send kafka topics to different elastic search hosts through logstash

**URL:** https://discuss.elastic.co/t/send-kafka-topics-to-different-elastic-search-hosts-through-logstash/242446
**Category:** Logstash
**Created:** [July 24, 2020, 5:00am UTC](https://discuss.elastic.co/t/send-kafka-topics-to-different-elastic-search-hosts-through-logstash/242446 "2020-07-24T05:00:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ankit9787](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@ankit9787](https://discuss.elastic.co/u/ankit9787)
#### Post date: [July 24, 2020, 5:00am UTC](https://discuss.elastic.co/t/send-kafka-topics-to-different-elastic-search-hosts-through-logstash/242446/1 "2020-07-24T05:00:11Z")

</div>

I have created one logstash conf file and reading kafka topic and trying to send to different elastic search deployed on different servers. Can you please help, what I am doing wrong. Nothings happening. Below my code  
When I up the instance, data going to local elastic search only not deployed on abc:9200

```auto
input { 
  kafka { 
    bootstrap_servers => "localhost:9092" 
    topics => ["topic_1"]
    }	
}
output {
  elasticsearch { 
    hosts => ["abc:9200","localhost:9200"] 
	index => "contacttrace"
 }
}

```

---

<div class="post-metadata">

### Author: ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)
#### Post date: [July 24, 2020, 5:14am UTC](https://discuss.elastic.co/t/send-kafka-topics-to-different-elastic-search-hosts-through-logstash/242446/2 "2020-07-24T05:14:00Z")

</div>

I have no experience with this plugin, but does it really emit events with a field `[kafka][bootstrap_servers]`? If it doesn't, you'll have to `add_field => {"[kafka][bootstrap_servers]" => "…"} ` that yourself in the input.

---

<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: [August 21, 2020, 5:19am UTC](https://discuss.elastic.co/t/send-kafka-topics-to-different-elastic-search-hosts-through-logstash/242446/3 "2020-08-21T05:19:56Z")

</div>

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