Hello elasticusers,
I have a question about exceptions in the filter part of Logstash.
This is my config file (I don't describe the "intput" and "output" parts) :
input { file{} } filter { csv { ...} grok {...} date{...} ruby{...} } output { elasticsearch {} }
Is it possible to handle exceptions generated by filters (csv, ruby...)?
I can apply a statement like this :
if "_csvparsefailure" in [tags] {
...
}
But I want to extract the exception message in this case, for example :
_":exception=>#<CSV::MalformedCSVError: Illegal quoting in line 1.>".
Is it possible to catch this exception message in order to output it to the file?
output { file { path => "/path_to_my_file/filter_error.log" codec => line { format => "%{message} | %{exception_filter_expected}" } } }
Used version : Logstash 6.3.0
Thank you in advance for your help.