Hi
@leandrojmp There we will continue topic from Grok for data - #13 by leandrojmp
now we need to complete process for parsing below date with the exact content:
input {
file {
mode => read
path =>"/opt/data/input/export_a_202207*"
codec => multiline {
pattern => "#"
what => previous
negate => true
max_lines => 600000
max_bytes => 20000000
auto_flush_interval => 5
}
sincedb_path => "/dev/null"
}
}
filter {
mutate {
gsub => ["message", "\n",";"]
}
mutate {
split => {
"message" => ";"
}
}
dissect {
mapping => {
"[message][0]" => "# %{activity},%{val},%{time}"
}
remove_field => ["[message][0]"]
}
split {
field => "message"
}
date {
match => ["time", "yyyyMMddHHmmss"]
timezone => "Europe/Paris"
}
dissect {
mapping => {
"message" => "%{}(%{type} %{numvalue}, %{status} %{statusval}, %{list} %{listval})"
}
}
} #filter
output {
stdout { codec => rubydebug{}
}
}
sample data:
[file1](Easyupload.io - Upload files for free and transfer big files easily.)
data highlight:
# snapshot,66593881,20220711061504
list_of_count(number 00000801163158, abort 0, onlist yes)
list_of_count(number 00001004020051, abort 0, onlist yes)
list_of_count(number 00006053206182, abort 0, onlist yes)
list_of_count(number 00006053303925, abort 0, onlist yes)
list_of_count(number 00007504958630, abort 0, onlist yes)
list_of_count(number 00009053373401, abort 0, onlist yes)
list_of_count(number 00060633330647, abort 0, onlist yes)
list_of_count(number 00090533747262, abort 0, onlist yes)
list_of_count(number 00114798160038, abort 0, onlist yes)
# 20220711061537
[file2](Easyupload.io - Upload files for free and transfer big files easily.)