# Logstash not processing JSON files

**URL:** <https://discuss.elastic.co/t/logstash-not-processing-json-files/68717>\
**Category:** Logstash\
**Created:** [December 12, 2016, 2:01pm UTC](https://discuss.elastic.co/t/logstash-not-processing-json-files/68717 "2016-12-12T14:01:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Airn5475](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/airn5475/32/13757_2.png) [@Airn5475](https://discuss.elastic.co/u/Airn5475)\
**Post date:** [December 12, 2016, 2:01pm UTC](https://discuss.elastic.co/t/logstash-not-processing-json-files/68717/1 "2016-12-12T14:01:50Z")

</div>

I am trying to get FileBeat working with Logstash, but not having much luck. I decided to see if I could simply get Logstash to take in JSON files and dump them to Elasticsearch.  
I started with a basic console to Elasticsearch, which works:

```
input { 
    stdin { } 
} 
output { 
    stdout { } 
    elasticsearch { hosts => ["localhost:9200"] }
}

```

When I try to read .json files from a folder, nothing happens:

```
input { 
  file {
    type => "json"
    path => "C:/Elasticsearch5/elasticsearch/data/*.json"
  }
}
filter {
  json {
    source => "message"  
  }
} 
output { 
    stdout {} 
    elasticsearch { 
      hosts => ["localhost:9200"]
      codec => "json"
    }
}

```

This is the type of output that just keeps repeating itself:

> [pool-2-thread-7] DEBUG logstash.instrument.collector - Collector: Sending snapshot to observers {:created\_at=\>2016-12-12 08:55:29 -0500}  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/1AB.json: old size 0, new size 32  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/2AM.json: old size 0, new size 24  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/3RK.json: old size 0, new size 23  
> [pool-2-thread-4] DEBUG logstash.instrument.collector - Collector: Sending snapshot to observers {:created\_at=\>2016-12-12 08:55:30 -0500}  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/1AB.json: old size 0, new size 32  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/2AM.json: old size 0, new size 24  
> [[main]\<file] DEBUG logstash.inputs.file - each: file grew: C:/Elasticsearch5/elasticsearch/data/3RK.json: old size 0, new size 23  
> [pool-2-thread-7] DEBUG logstash.instrument.collector - Collector: Sending snapshot to observers {:created\_at=\>2016-12-12 08:55:31 -0500}  
> [Ruby-0-Thread-15: C:/Elasticsearch5/logstash-5.0.2/logstash-core/lib/logstash/pipeline.rb:455] DEBUG logstash.pipeline - Pushing flush onto pipeline

---

<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:** [January 9, 2017, 2:02pm UTC](https://discuss.elastic.co/t/logstash-not-processing-json-files/68717/2 "2017-01-09T14:02:14Z")

</div>

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