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

Validation of match config #70

Open wiibaa opened 8 years ago

wiibaa commented 8 years ago

If by mistake the match config contains a hash instead of a valid string or array like this

grok {
  match => {
    a => { "b" => "c" }
  }
}

Logstash fails to start with a cryptic error can't convert Array into String For a concrete example where a user can create this case and be lost, see https://discuss.elastic.co/t/filter-if-results-in-cant-convert-array-into-string-error/38805

Is there a mean for grok and this plugin to raise a better error message when the match config is invalid before jumping in config parser discussions.