Output json


Im running logstash to collect json log file. the log file contains lines of logs in json format. here is my configuration

input {
file {
codec => "json"
path => "C:\Logs\Client.txt"
path => "C:\Logs\Server.txt"

output {
stdout { codec => rubydebug }
elasticsearch {
codec => "json"
hosts => [ "localhost:9200" ]

now the thing is that to the debug window outputs the json correctly, means it breaks the json to fields as expected. but into the elastic it does not, it stays on the 'message' field as the all json log line

any idea?

thanks !

For starters, remove codec => "json" from your elasticsearch output configuration and let's see if that helps.

Thanks :slight_smile: it works, this was the thing

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