# Reading JSON data from logstash

**URL:** <https://discuss.elastic.co/t/reading-json-data-from-logstash/237465>\
**Category:** Logstash\
**Created:** [June 17, 2020, 11:47am UTC](https://discuss.elastic.co/t/reading-json-data-from-logstash/237465 "2020-06-17T11:47:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TUSHAR\_Sinha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_sinha/32/69782_2.png) [@TUSHAR\_Sinha](https://discuss.elastic.co/u/TUSHAR_Sinha)\
**Post date:** [June 17, 2020, 11:47am UTC](https://discuss.elastic.co/t/reading-json-data-from-logstash/237465/1 "2020-06-17T11:47:24Z")

</div>

Hi all,  
I have a lot of JSON data and I want to visualize it. I have seen the POST\_bulk method in Kibana, but it is not dynamic. We can not update the data whenever it is being generated. So, I thought of using logstash for this purpose and read my JSON files. I am not able to find the exact solution to this. I am posting my logstash.conf file below. What changes do I have to make?

``````````````````````````````````````````````````````````````````````````````auto
input{
    file{
        path => "C:\Users\tushar\Documents\Reports\JsonData\first_run*.json"
        start_position => "beginning"
        type => "json"
        sincedb_path => "NULL"
    }
    # stdin{}
}

filter{
    json{
        source => "message"
    }
}
output{
      elasticsearch{
          hosts => "http://localhost:9200"
           index => "jsondata"
     }
    stdout{
        codec =>"rubydebug"
    }
}
`````````````````````````````````````````````````````````````````````````````

I have gone through a few discussions on this topic on this site only. But I am not able to find the solution from those discussions. Also currently by using this logstash.conf, I am not able to read the JSON file and it is not getting reflected in Kibana UI Index. Kindly, help me with this.
``````````````````````````````````````````````````````````````````````````````

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 17, 2020, 2:23pm UTC](https://discuss.elastic.co/t/reading-json-data-from-logstash/237465/2 "2020-06-17T14:23:08Z")

</div>

Do not use backslash in the path option of a file input, use forward slash.

If you do not want the in-memory sincedb persisted across restarts then on Windows set the sincedb\_path option to "NUL".

---

<div class="post-metadata">

**Author:** ![TUSHAR\_Sinha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_sinha/32/69782_2.png) [@TUSHAR\_Sinha](https://discuss.elastic.co/u/TUSHAR_Sinha)\
**Post date:** [June 17, 2020, 2:28pm UTC](https://discuss.elastic.co/t/reading-json-data-from-logstash/237465/3 "2020-06-17T14:28:39Z")

</div>

I did the changes but it was of no use still it is not reading the JSON data from that directory.

---

<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 15, 2020, 2:28pm UTC](https://discuss.elastic.co/t/reading-json-data-from-logstash/237465/4 "2020-07-15T14:28:50Z")

</div>

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