# Unable to parse JSON file and send it to elasticsearch

**URL:** <https://discuss.elastic.co/t/unable-to-parse-json-file-and-send-it-to-elasticsearch/73634>\
**Category:** Logstash\
**Created:** [February 2, 2017, 6:17am UTC](https://discuss.elastic.co/t/unable-to-parse-json-file-and-send-it-to-elasticsearch/73634 "2017-02-02T06:17:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharath\_Vutpala](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Sharath\_Vutpala](https://discuss.elastic.co/u/Sharath_Vutpala)\
**Post date:** [February 2, 2017, 6:17am UTC](https://discuss.elastic.co/t/unable-to-parse-json-file-and-send-it-to-elasticsearch/73634/1 "2017-02-02T06:17:07Z")

</div>

Hi,

I am trying to parse a JSON log file generated by an application and send it to elasticsearch and from there to kibana. I have tried so many methods, but there is no luck. Below is the logstash config file i am using. Please help me.

input {  
file {  
codec =\> json  
path =\> "/home/test/\*"  
sincedb\_path =\> "dev/null"  
start\_position =\> "beginning"  
}  
}  
filter {  
if [tags][json] {  
json {  
source =\> "message"  
}  
}  
}  
output {  
elasticsearch {  
hosts =\> ["10.0.2.15:9200"]  
}  
}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 2, 2017, 6:44am UTC](https://discuss.elastic.co/t/unable-to-parse-json-file-and-send-it-to-elasticsearch/73634/2 "2017-02-02T06:44:16Z")

</div>

I'm assuming you're trying out Logstash from a shell rather than running it as a service.

> ```
> sincedb_path => "dev/null"
> 
> ```

Unless you're running Logstash from the file system's root this should be:

```
sincedb_path => "/dev/null"

```

Before attempting to get anything into Elasticsearch, use a `stdout { codec => rubydebug }` output and verify that you're getting stuff to stdout. Once that works you can reenable the elasticsearch output.

---

<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:** [March 2, 2017, 6:44am UTC](https://discuss.elastic.co/t/unable-to-parse-json-file-and-send-it-to-elasticsearch/73634/3 "2017-03-02T06:44:17Z")

</div>

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