# Filebeat 6.2.4 not processing JSON log and not submitting to Logstsash

**URL:** https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715
**Category:** Beats
**Tags:** filebeat
**Created:** [May 5, 2018, 7:15pm UTC](https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715 "2018-05-05T19:15:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pbala2018](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@pbala2018](https://discuss.elastic.co/u/pbala2018)
#### Post date: [May 5, 2018, 7:15pm UTC](https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715/1 "2018-05-05T19:15:58Z")

</div>

Hi,

I am trying to process a simple JSON file into Logstash but i see the logstash which is listening at port 5045 is not receiving any data from filebeat.

Here is my filebeat and logstash config

#=========================== Filebeat prospectors =============================

filebeat.prospectors:

- type: log  
enabled: true  
paths:  
- D:\ELK\post-data\*.json  
document\_type: json  
json.keys\_under\_root: true  
json.add\_error\_key: true  
processors:
  - decode\_json\_fields:  
fields: ['message']  
target: json

#----------------------------- Logstash output --------------------------------  
output.logstash:  
hosts: ["localhost:5045"]

And here is my simple 1 line json from file  
{"logs":[{"type":"stats","cat":"EXP","majorver":1,"minorver":3049,"assets":[{"id":"5236182236200021"},{"id":"4236182236100021"},{"id":"1234567002100021"},{"id":"3236182234500021"},{"id":"8236182234900022"},{"id":"4236182234600022"}]}],"createdDateTime":"2018-05-04T11:26:55.015Z","nat":"AG","Card":"1043712373","version":"1.0","Serial":"642","Id":"2","hd":"31","mware":"EA2"}

---

<div class="post-metadata">

### Author: ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)
#### Post date: [May 10, 2018, 9:28am UTC](https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715/2 "2018-05-10T09:28:48Z")

</div>

Can you run filebeat with in debug mode ( `-e -d *`) and post the resulting logs in here? (Wrap the logs between ``` ... ``` so they are more readable)

---

<div class="post-metadata">

### Author: ![pbala2018](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@pbala2018](https://discuss.elastic.co/u/pbala2018)
#### Post date: [May 10, 2018, 2:00pm UTC](https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715/3 "2018-05-10T14:00:22Z")

</div>

@adrisr, thanks for your response. i have managed to figure out the problem.  
The file does not include a new line at the end of the file."\n"

I just added the new line"\n", data was processed and sent.

FR:[Filebeat not sending JSON to file](https://discuss.elastic.co/t/filebeat-not-sending-json-to-file/128009/6)

---

<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: [June 7, 2018, 2:00pm UTC](https://discuss.elastic.co/t/filebeat-6-2-4-not-processing-json-log-and-not-submitting-to-logstsash/130715/4 "2018-06-07T14:00:33Z")

</div>

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