Beats to post JSON to elasticsearch

Hi

I was following https://www.elastic.co/blog/structured-logging-filebeat

I am using Folebeat 1.2.3. Is there any requirement of any specifc version of ElasticSearch also to make it work. I am posting to AWS ElasticSearch service.

After following everything also it has not created message as json.
I am getting following output

{ "_index": "test-2016.06.22", "_type": "log", "_id": "AVV3sPlZgL-ny14uxzET", "_score": null, "_source": { "@timestamp": "2016-06-22T10:38:52.292Z", "beat": { "hostname": "QHSL24698", "name": "QHSL24698" }, "count": 1, "fields": { "planet": "Magrathea", "service": "<nil>" }, "input_type": "log", "message": "{\"verified\": false, \"user\": \"arthur\", \"session_id\": \"91e5b9d\", \"id\": 42, \"event\": \"tests\"}", "offset": 476, "source": "C:\\Users\\shrivastavar\\Documents\\Tesla\\Architecture Work\\ELK\\NetSeriLog\\NetSeriLogSample\\logs\\log.txt", "type": "log" }, "fields": { "@timestamp": [ 1466591932292 ] }, "sort": [ 1466591932292 ] }

From the blog post, "Starting with version 5.0 (currently in alpha, but you can give it a try), Filebeat is able to also natively decode JSON objects if they are stored one per line like in the above example."

You need to use Filebeat 5.x if you want JSON support.

I am installing on windows 7 and I have following configuration for logging in filebeat.yml

logging.level: info logging.to_files: true logging.files.path: "C:\ProgramData\filebeat\Logs" logging.files.name: mybeat.log

However I see no logs and nothing happens. could you please tell me why filebeat not logging anything?

Managed to fix this issue. @andrewkroh could you please tell me is there any workaround to make filebeat5.0.0alpha3 to work for json with line breaks basically multi line support?

It's an open issue on github.

This topic was automatically closed after 21 days. New replies are no longer allowed.