Strict schema when using CSV plugin

(Israel Elmekies) #1

Hi All,

I'm relatively new to Logstash.
I'm using the CSV filter plugin to read a csv log. I wanted to add the option that if the line that is being read
does not have the same schema as defined, then an error will be written to a log file.

The things is, any schema is good for the plugin. The only thing causing a _csvparsefailure is an empty line.
For example, if my schema is
columns => ["a", "b"]
and my input is "hello,world,bla" I will not get a _csvparsefailure.
Is there any way to work with a 'strict' schema? Meaning any message that is does not produce that exact amount of column as specified should be considered a parsing failure.

Thanks for any help!

(system) #2

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