Hi there
I have a problem to transform this line form a log file line to a json object.
The line is like this
[2020-02-14 14:33:08.882] [VALUE1] [VALUE2] [VALUE3] [VALUE4] [VALUE5] [VALUE6] [VALUE7] [VALUE8] # Other text
to
Property1 : "VALUE1",
Property2 : "VALUE2",
Property3 : "VALUE3",
Property4 : "VALUE4",
Property5 : "VALUE5",
Property6 : "VALUE6",
Property7 : "VALUE7",
Property8 : "VALUE8",
Property9: "Other text"
to store it easily in elasticsearch.
with this
filter {
grok {
match => { "message" => "[%{TIMESTAMP_ISO8601:Property1}] [%{WORD:Property2}] [%{WORD:Property3}] [%{WORD:Property4}] [%{WORD:Property5}] [%{WORD:Property6}] [%{WORD:Property7}] [%{DATA:Property8}] [%{DATA:Property9}] ?# %{DATA:Property10}" }
}
}
but last key-value property10 : # other text.... does not give me 'other text...'
Any help?
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.