# JSON \> Logstash \> ElasticSearch

**URL:** <https://discuss.elastic.co/t/json-logstash-elasticsearch/25544>\
**Category:** Logstash\
**Created:** [July 14, 2015, 6:31pm UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544 "2015-07-14T18:31:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorsuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taylorsuk/32/3697_2.png) [@taylorsuk](https://discuss.elastic.co/u/taylorsuk)\
**Post date:** [July 14, 2015, 6:31pm UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/1 "2015-07-14T18:31:54Z")

</div>

I have had some good info from a user in answer to my question [here](https://discuss.elastic.co/t/index-filter-and-query-strategy/25536/5) and am having issues with my config.

Basically I would like to import / index my pretty JSON file map one field to `not_analized` to my remote ElasticSearch index.

I am using this config to test locally:

```
input {
  file {
    path => "/Users/taylorsuk/Desktop/Exercises_Single.json"
    type => "exercises"
    codec => "json"
  }
}
output {
  stdout { codec => rubydebug }
  elasticsearch { 
  host => "localhost" 
  protocol => "http"
  }
}

```

and getting this error:

```
Simons-MacBook-Pro:logstash-1.5.2 taylorsuk$ bin/logstash -f logstash-guru.conf
Jul 14, 2015 7:25:13 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] version[1.5.1], pid[91394], build[5e38401/2015-04-09T13:41:35Z]
Jul 14, 2015 7:25:13 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] initializing ...
Jul 14, 2015 7:25:13 PM org.elasticsearch.plugins.PluginsService <init>
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] loaded [], sites []
Jul 14, 2015 7:25:15 PM org.elasticsearch.node.internal.InternalNode <init>
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] initialized
Jul 14, 2015 7:25:15 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] starting ...
Jul 14, 2015 7:25:15 PM org.elasticsearch.transport.TransportService doStart
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.0.11:9300]}
Jul 14, 2015 7:25:15 PM org.elasticsearch.discovery.DiscoveryService doStart
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] elasticsearch/CHxctaujSuWMn4MUz2xmEg
Jul 14, 2015 7:25:45 PM org.elasticsearch.discovery.DiscoveryService waitForInitialState
WARNING: [logstash-Simons-MacBook-Pro.local-91394-13456] waited for 30s and no initial state was set by the discovery
Jul 14, 2015 7:25:45 PM org.elasticsearch.node.internal.InternalNode start
INFO: [logstash-Simons-MacBook-Pro.local-91394-13456] started
Failed to install template: waited for [30s] {:level=>:error}

```

Many thanks in advance.

Simon

---

<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:** [July 15, 2015, 12:28am UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/2 "2015-07-15T00:28:21Z")

</div>

What does `curl localhost:9200/` return?

---

<div class="post-metadata">

**Author:** ![taylorsuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taylorsuk/32/3697_2.png) [@taylorsuk](https://discuss.elastic.co/u/taylorsuk)\
**Post date:** [July 15, 2015, 5:45am UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/3 "2015-07-15T05:45:14Z")

</div>

@warkolm thanks for your reply.  
it returns :

```
Simons-MacBook-Pro:logstash-1.5.2 taylorsuk$ curl localhost:9200/
{
  "status" : 200,
  "name" : "Guru_Node-dev",
  "cluster_name" : "rehab_guru-dev",
  "version" : {
    "number" : "1.6.0",
    "build_hash" : "cdd3ac4dde4f69524ec0a14de3828cb95bbb86d0",
    "build_timestamp" : "2015-06-09T13:36:34Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
```

---

<div class="post-metadata">

**Author:** ![vkaggal](https://avatars.discourse-cdn.com/v4/letter/v/8e7dd6/32.png) [@vkaggal](https://discuss.elastic.co/u/vkaggal)\
**Post date:** [September 15, 2015, 4:52pm UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/4 "2015-09-15T16:52:24Z")

</div>

Hey, just curious, if you figured out a solution for the issue you were facing, I seem to be having the same issue.

(yes, elasticsearch works, I can connect using curl, kibana, marvel)

Your help would be appreciated!

Thanks.

---

<div class="post-metadata">

**Author:** ![taylorsuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taylorsuk/32/3697_2.png) [@taylorsuk](https://discuss.elastic.co/u/taylorsuk)\
**Post date:** [September 15, 2015, 6:21pm UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/5 "2015-09-15T18:21:41Z")

</div>

I didn't manage to get this sorted - I just run my imports manually and don't bother with logstash.

Sorry I cannot be any help. I use [searchly.com](http://searchly.com) it has good visualisation in the dashboard which makes things easier for me.

Simon

---

<div class="post-metadata">

**Author:** ![ankmathur14](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@ankmathur14](https://discuss.elastic.co/u/ankmathur14)\
**Post date:** [September 15, 2015, 8:32pm UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/6 "2015-09-15T20:32:27Z")

</div>

I think your logstash is not able to find your elasticsearch cluster.  
Try to put your cluster name in logstash's elasticsearch output.  
Default elasticsearch cluster name for logstash is "ElasticSearch"  
e.g -

output {  
stdout { codec =\> rubydebug }  
elasticsearch {  
host =\> "localhost"  
protocol =\> "http"  
cluster =\> "rehab\_guru-dev"  
}

---

<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:** [July 6, 2017, 5:29am UTC](https://discuss.elastic.co/t/json-logstash-elasticsearch/25544/7 "2017-07-06T05:29:04Z")

</div>


