logstash-plugins / logstash-filter-grok

Grok plugin to parse unstructured (log) data into something structured.
https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html
Apache License 2.0
124 stars 98 forks source link

Old array syntax for match appears deprecated, but still documented. #44

Closed jarpy closed 9 years ago

jarpy commented 9 years ago

The docs suggest that the match configuration option can still take an array, but the current code doesn't seem to like it.

Repro script:

echo 'banana 7' | /opt/logstash/bin/logstash -e '
input {
  stdin {}
}

filter {
  grok {
    match => [
      "message",
      "%{WORD:word}",
      "%{POSINT:number}"
    ]
  }
}

output {
  stdout {
    codec => rubydebug
  }
}
'

Output:

Invalid setting for grok filter plugin:

  filter {
    grok {
      # This setting must be a hash
      # This field must contain an even number of items, got 3
      match => ["message", "%{WORD:word}", "%{POSINT:number}"]
      ...
    }
  } {:level=>:error}
jarpy commented 9 years ago

Pull request #45 removes documentation for the array syntax.

jarpy commented 9 years ago

Fixed in #46