Filebeat 6.2.4 not processing JSON log and not submitting to Logstsash

(BP) #1


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 =============================


  • type: log
    enabled: true
    - D:\ELK\post-data*.json
    document_type: json
    json.keys_under_root: true
    json.add_error_key: true
    • decode_json_fields:
      fields: ['message']
      target: json

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

And here is my simple 1 line json from file

Filebeat parse json
(Adrian Serrano) #2

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)

(BP) #3

@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

(system) #4

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