Determining which item in patterns array of a grok plugin was matched

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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.