Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle and log invalid IP address errors #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eht16
Copy link

@eht16 eht16 commented Sep 6, 2016

If the filter get any invalid input for the anonymize_ipv4_network
mode, it will crash the whole Logstash pipeline because of an
unhandled ArgumentError thrown by the IPAddr class.
Furthermore, the causing event got lost during the crash, so
post-mortem analysis were not possible.

Now, ArgumentError is catched and an error message is logged.
The value to be anonymized is kept in the event in the identified form
and the event gets processed further as usual.

Also add a tag to events where the filter failed so those events can be found easier.

Fixes #3.

@eht16
Copy link
Author

eht16 commented Sep 6, 2016

Note: I'm not a Ruby dev, maybe the exception handling can be done nicer.

@karmi
Copy link

karmi commented Dec 4, 2016

Hi @eht16, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile?

eht16 added 2 commits December 4, 2016 12:45
If the filter get any invalid input for the anonymize_ipv4_network
mode, it will crash the whole Logstash pipeline because of an
unhandled ArgumentError thrown by the IPAddr class.
Furthermore, the causing event got lost during the crash, so
post-mortem analysis were not possible.

Now, ArgumentError is catched and an error message is logged.
The value to be anonymized is kept in the event in the identified form
and the event gets processed further as usual.

Fixes logstash-plugins#3.
This eases tracking of events where anonymizing failed.
@eht16 eht16 force-pushed the issue3_ipaddr_error_handling branch from 490caf8 to f6957cf Compare December 4, 2016 11:47
@eht16
Copy link
Author

eht16 commented Dec 4, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants