# Logstash can't connect to Elasticseach

**URL:** <https://discuss.elastic.co/t/logstash-cant-connect-to-elasticseach/157212>\
**Category:** Logstash\
**Created:** [November 18, 2018, 8:53am UTC](https://discuss.elastic.co/t/logstash-cant-connect-to-elasticseach/157212 "2018-11-18T08:53:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanka\_Ryo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanka_ryo/32/37787_2.png) [@Sanka\_Ryo](https://discuss.elastic.co/u/Sanka_Ryo)\
**Post date:** [November 18, 2018, 8:53am UTC](https://discuss.elastic.co/t/logstash-cant-connect-to-elasticseach/157212/1 "2018-11-18T08:53:31Z")

</div>

Hello  
Now i had build ELK in centos 7 (6.1.2)  
Kibana, Elasticsearch and Logstash are running.  
But when i config logstash in ELK like that:

input {  
snmptrap {  
community =\> "public"  
type =\> "snmptrap"  
host =\> "0.0.0.0"  
port =\> 1062  
}  
}

output {  
elasticsearch {  
hosts =\> ["[http://192.168.1.150:9200](http://192.168.1.150:9200)"]  
}  
}

And i see Logstash's log:

[2018-11-18T21:01:42,542][INFO][logstash.pipeline] Pipeline has terminated {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x46580b28 run\>"}  
[2018-11-18T21:02:30,076][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.5.0"}  
[2018-11-18T21:02:35,937][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>1, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
[2018-11-18T21:02:37,207][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>, :added=\>[[http://192.168.1.150:9200/](http://192.168.1.150:9200/)]}}  
[2018-11-18T21:02:37,236][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://192.168.1.150:9200/](http://192.168.1.150:9200/), :path=\>"/"}  
[2018-11-18T21:02:37,692][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>"[http://192.168.1.150:9200/](http://192.168.1.150:9200/)"}  
[2018-11-18T21:02:37,828][INFO][logstash.outputs.elasticsearch] ES Output version determined {:es\_version=\>6}  
[2018-11-18T21:02:37,833][WARN][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document \_type {:es\_version=\>6}  
[2018-11-18T21:02:38,025][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["[http://192.168.1.150:9200](http://192.168.1.150:9200)"]}  
[2018-11-18T21:02:38,125][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2018-11-18T21:02:38,194][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>60001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword", "ignore\_above"=\>256}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date"}, "@version"=\>{"type"=\>"keyword"}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
[2018-11-18T21:02:38,204][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x2d0e348a run\>"}  
[2018-11-18T21:02:38,339][INFO][logstash.inputs.snmptrap] It's a Trap! {:Port=\>1062, :Community=\>["public"], :Host=\>"0.0.0.0"}  
[2018-11-18T21:02:38,357][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
[2018-11-18T21:02:39,178][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

But when i see index pattern on Kibana, i don't see anything...  
Pleass help me... thanks...

---

<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:** [December 16, 2018, 9:02am UTC](https://discuss.elastic.co/t/logstash-cant-connect-to-elasticseach/157212/2 "2018-12-16T09:02:25Z")

</div>

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