Skip to content

Warn when split drops event. #23

@cnico

Description

@cnico

Hello,

I have recently upgraded from logstash 2.3.1 to 5.1.1.
It took me a while to identify bugs in my logstash filter ruby code for a complex data to handle.

I faced a problem where I was sending data and nothing was going out as if the event was dropped while it is filtered.
After removing each line of logstash configuration, I finally found the problem was in the filter split.
And with some logs added in the split.rb file, I finally found that the problem is in this line of the plugin :

# Skip filtering if splitting this event resulted in only one thing found.
return if splits.length == 1 && original_value.is_a?(String)
#or splits[1].empty?

Actually my event stops at the return and nothing more happens : the event filter is stopped and there is nothing in the output even in debug mode.

So I created this issue in order to improve the split plugin to add a warning or debug log before the return and the drop of the event. It can save lots of searching time.

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions