on a valid json log, the input in Logstash looks like this: "{test=field}"
I would expect a valid json object: {"test": "field"}
2 interesting points:
when you set the output of the filebeat to a local file instead of logstash, it outputs a valid JSON
when you use any other field than message, it also produces a valid JSON
I need to do the decode on filebeat side. Because in production, I am doing some other processing on the fields.
The current workaround is to use different field as target, e.g. message-json, but it is quite clumsy and it needs additional adjustments on the logstash side, which I want to avoid.
I have prepared repository with minimal setup here, you can test it there.
This means that your original message is {test=field}, this is not a valid json.
I'm not sure what you are trying to achieve here, if you use the decode_json_fields filebeat will parse your json message, but if your message looks like this one, then it will not work because it is not a valid json.
Please share the content of the file: /var/log/log.log
I do not see any issue in Filebeat nor Logstash, they are doing what they are configured to do, but your original message is not a valid json.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.