# Logstash is not reading Json file

**URL:** <https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620>\
**Category:** Logstash\
**Created:** [March 22, 2017, 5:03pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620 "2017-03-22T17:03:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![udaykirankona](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@udaykirankona](https://discuss.elastic.co/u/udaykirankona)\
**Post date:** [March 22, 2017, 5:03pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620/1 "2017-03-22T17:03:30Z")

</div>

HI,

Logstash not giving any out put for Json input, my config as follows.

input {  
file {  
codec =\> json  
type =\> "json"  
path =\> "/path/\*"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
ignore\_older =\> 0  
}  
}  
filter {  
json {  
source =\> "message"  
}  
}  
output {  
stdout{codec =\> rubydebug}  
}

Logstash version - 2.4

Json file is as follows,

[{"target": "qns05\_memory-buffered", "datapoints": [[null, 1489740180], [null, 1489740240], [null, 1489740300], [null, 1489740360], [null, 1489740420], [null, 1489740480], [null, 1489740540], [null, 1489740600], [null, 1489740660], [null, 1489740720], [null, 1489740780], [null, 1489740840], [null, 1489740900], [null, 1489740960], [null, 1489741020], [null, 1489741080], [null, 1489741140], [null, 1489741200], [null, 1489741260], [null, 1489741320], [null, 1489741380], [null, 1489741440], [null, 1489741500], [null, 1489741560], [null, 1489741620], [null, 1489741680], [null, 1489741740], [null, 1489741800], [null, 1489741860], [null, 1489741920], [null, 1489741980], [null, 1489742040], [null, 1489742100], [null, 1489742160], [null, 1489742220], [null, 1489742280], [null, 1489742340], [null, 1489742400], [null, 1489742460], [null, 1489742520], [null, 1489742580], [null, 1489742640], [null, 1489742700], [null, 1489742760], [null, 1489742820], [null, 1489742880], [null, 1489742940], [null, 1489743000], [null, 1489743060], [null, 1489743120], [null, 1489743180], [null, 1489743240], [null, 1489743300], [null, 1489743360], [null, 1489743420], [null, 1489743480], [null, 1489743540], [null, 1489743600], [null, 1489743660], [null, 1489743720], [null, 1489743780], [null, 1489743840], [null, 1489743900], [null, 1489743960], [null, 1489744020], [null, 1489744080], [null, 1489744140], [null, 1489744200], [null, 1489744260], [null, 1489744320], [null, 1489744380], [null, 1489744440], [null, 1489744500], [null, 1489744560], [null, 1489744620], [null, 1489744680], [null, 1489744740], [null, 1489744800], [null, 1489744860], [null, 1489744920], [null, 1489744980], [null, 1489745040], [null, 1489745100], [null, 1489745160], [null, 1489745220], [null, 1489745280], [null, 1489745340], [null, 1489745400], [null, 1489745460], [null, 1489745520], [null, 1489745580], [null, 1489745640], [null, 1489745700], [null, 1489745760], [null, 1489745820], [null, 1489745880], [null, 1489745940], [null, 1489746000], [null, 1489746060], [null, 1489746120], [null, 1489746180], [null, 1489746240], [null, 1489746300], [null, 1489746360], [null, 1489746420], [null, 1489746480], [null, 1489746540], [null, 1489746600], [null, 1489746660], [null, 1489746720], [null, 1489746780], [null, 1489746840], [null, 1489746900], [null, 1489746960], [null, 1489747020], [null, 1489747080], [null, 1489747140], [null, 1489747200], [null, 1489747260], [null, 1489747320], [null, 1489747380], [null, 1489747440], [null, 1489747500], [null, 1489747560], [null, 1489747620], [null, 1489747680], [null, 1489747740], [null, 1489747800], [null, 1489747860], [null, 1489747920], [null, 1489747980], [null, 1489748040], [null, 1489748100], [null, 1489748160], [null, 1489748220], [null, 1489748280], [null, 1489748340], [null, 1489748400], [null, 1489748460], [null, 1489748520], [null, 1489748580], [null, 1489748640], [null, 1489748700], [null, 1489748760], [null, 1489748820], [null, 1489748880], [null, 1489748940], [null, 1489749000], [null, 1489749060], [null, 1489749120], [null, 1489749180], [null, 1489749240], [null, 1489749300], [null, 1489749360], [null, 1489749420], [null, 1489749480], [null, 1489749540], [null, 1489749600], [null, 1489749660], [null, 1489749720]]}, {"target": "qns05\_memory-cached", "datapoints": [[null, 1489740180], [null, 1489740240], [null, 1489740300], [null, 1489740360], [null, 1489740420], [null, 1489740480], [null, 1489740540], [null, 1489740600], [null, 1489740660], [null, 1489740720], [null, 1489740780], [null, 1489740840], [null, 1489740900], [null, 1489740960], [null, 1489741020], [null, 1489741080], [null, 1489741140], [null, 1489741200], [null, 1489741260], [null, 1489741320], [null, 1489741380], [null, 1489741440], [null, 1489741500], [null, 1489741560], [null, 1489741620], [null, 1489741680], [null, 1489741740], [null, 1489741800], [null, 1489741860], [null, 1489741920], [null, 1489741980], [null, 1489742040], [null, 1489742100], [null, 1489742160], [null, 1489742220], [null, 1489742280], [null, 1489742340], [null, 1489742400], [null, 1489742460], [null, 1489742520], [null, 1489742580], [null, 1489742640], [null, 1489742700], [null, 1489742760], [null, 1489742820], [null, 1489742880], [null, 1489742940], [null, 1489743000], [null, 1489743060], [null, 1489743120], [null, 1489743180], [null, 1489743240], [null, 1489743300], [null, 1489743360], [null, 1489743420], [null, 1489743480], [null, 1489743540], [null, 1489743600], [null, 1489743660], [null, 1489743720], [null, 1489743780], [null, 1489743840], [null, 1489743900], [null, 1489743960], [null, 1489744020], [null, 1489744080], [null, 1489744140], [null, 1489744200], [null, 1489744260], [null, 1489744320], [null, 1489744380], [null, 1489744440], [null, 1489744500], [null, 1489744560], [null, 1489744620], [null, 1489744680], [null, 1489744740], [null, 1489744800], [null, 1489744860], [null, 1489744920], [null, 1489744980], [null, 1489745040], [null, 1489745100], [null, 1489745160], [null, 1489745220], [null, 1489745280], [null, 1489745340], [null, 1489745400], [null, 1489745460], [null, 1489745520], [null, 1489745580], [null, 1489745640], [null, 1489745700], [null, 1489745760], [null, 1489745820], [null, 1489745880], [null, 1489745940], [null, 1489746000], [null, 1489746060], [null, 1489746120], [null, 1489746180], [null, 1489746240], [null, 1489746300], [null, 1489746360], [null, 1489746420], [null, 1489746480], [null, 1489746540], [null, 1489746600], [null, 1489746660], [null, 1489746720], [null, 1489746780], [null, 1489746840], [null, 1489746900], [null, 1489746960], [null, 1489747020], [null, 1489747080], [null, 1489747140], [null, 1489747200], [null, 1489747260], [null, 1489747320], [null, 1489747380], [null, 1489747440], [null, 1489747500], [null, 1489747560], [null, 1489747620], [null, 1489747680], [null, 1489747740], [null, 1489747800], [null, 1489747860], [null, 1489747920], [null, 1489747980], [null, 1489748040], [null, 1489748100], [null, 1489748160], [null, 1489748220], [null, 1489748280], [null, 1489748340], [null, 1489748400], [null, 1489748460], [null, 1489748520], [null, 1489748580], [null, 1489748640], [null, 1489748700], [null, 1489748760], [null, 1489748820], [null, 1489748880], [null, 1489748940], [null, 1489749000], [null, 1489749060], [null, 1489749120], [null, 1489749180], [null, 1489749240], [null, 1489749300], [null, 1489749360], [null, 1489749420], [null, 1489749480], [null, 1489749540], [null, 1489749600], [null, 1489749660], [null, 1489749720]]}]

Please help with this

Thanks,  
Uday.K

---

<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:** [March 22, 2017, 8:13pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620/2 "2017-03-22T20:13:39Z")

</div>

Does the input file end with a newline character?

You should get useful clues if you bump Logstash's logging level. One possible cause could be a typo in the filename pattern or a permissions issue.

---

<div class="post-metadata">

**Author:** ![udaykirankona](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@udaykirankona](https://discuss.elastic.co/u/udaykirankona)\
**Post date:** [March 28, 2017, 11:34am UTC](https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620/3 "2017-03-28T11:34:44Z")

</div>

Hi Magnus,

Thanks for your reply, after adding newline to files able to read the files.

Thanks,  
Uday.K

---

<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:** [April 25, 2017, 11:35am UTC](https://discuss.elastic.co/t/logstash-is-not-reading-json-file/79620/4 "2017-04-25T11:35:15Z")

</div>

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