jsonlines - JSON parse error, original data now in message field
{:message=>"Unexpected character ('-' (code 45)): Expected space separating root-level values\n at [Source: (String)\"2023-12-22 09:41:56,343
if [message] =~ /actions/ { <-- this means it contains something else except date part as string
json { source => "message" <-- no target set. DocL: Define the target field for placing the parsed data. If this setting is omitted, the JSON data will be stored at the root (top level) of the event.
date { match => [ "message" <-- are you sure that this is correct field.
tags _jsonparsefailure <-- your json conversion was failed because it contains "Unexpected character ('-'
if [message] =~ /actions/ { <-- here i try to select all logs that contains 'actions'.
Then i try to put the date at @timestamp using the examples i found at google...
It's easier with TIMESTAMP_ISO8601, something like this %{TIMESTAMP_ISO8601:time}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}\[%{WORD:action},%{DATA:something1}%{DATA:something2},\]%{SPACE}%{INT:num}%{SPACE}
for the line like this:
2023-12-22 13:17:10.222 INFO [actions,,] 7 ---
[Note: this is not full line, too lazy]
Also then you can use: if [action] == "actions" { ...
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.