Assuming we're using the grok filter plugin in the "multiple patterns for a single field" mode:
filter {
grok {
match => {
"message" => [
"Duration: %{NUMBER:duration}",
"Speed: %{NUMBER:speed}"
]
}
}
}
I need to know which pattern item in the array was matched, to use that array "index" in another corespondent array and extract the relevant item.
It is worth mentioning that the grok filter is being used inside ruby code.
Thanks