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

http module fails and breaks logstash #2560

Closed
pulecp opened this issue Feb 10, 2015 · 6 comments
Closed

http module fails and breaks logstash #2560

pulecp opened this issue Feb 10, 2015 · 6 comments

Comments

@pulecp
Copy link

pulecp commented Feb 10, 2015

Hi guys

I tried to read icinga logs by logstash and over http module reflect acknowledges and scheduled downtimes to flapjack. Here is configuration https://gist.github.com/pulecp/3e57bff231146f2fc88a. But logstash is working about 2 hours and then die with this error (I see about 10 undandled exception and then error with gsub) https://gist.github.com/pulecp/6e8df2837aa6da5c622b

http module shouldn't break logstash

logstash: 1.4.2-1_2c0f5a1
kernel: 2.6.32-504.1.3.el6.x86_64

@pulecp pulecp changed the title http module fail and broke logstash http module fails and breaks logstash Feb 10, 2015
@ph
Copy link
Contributor

ph commented Feb 11, 2015

The error seems to be inside a ruby filter because of the Exception in filterworker and the reference to eval in your error log.

From your configuration you are using custom ruby filters, If I remember correctly the URI::encode uses gsub to transform the string. Can it be possible that the value is NIL in some cases?

@ph
Copy link
Contributor

ph commented Feb 11, 2015

I agree the pipeline should be more resilient and theses specific cases, we are working on improving it in a future release.

@pulecp
Copy link
Author

pulecp commented Feb 11, 2015

code => "require 'open-uri';event['icinga_check_encoded'] = URI::encode(event['icinga_check'])"

The error could be from this code. But I still thing that it shouldn't stop logstash to process data. 2¢

@ph
Copy link
Contributor

ph commented Feb 11, 2015

You can add a check:

require 'open-uri';event['icinga_check_encoded'] = URI::encode(event['icinga_check']) unless event['icinga_check'].nil?

And you can add a conditionals in your output to filter the events?

What is the content of the icinga_check field, do you really need to encode it?

@ph
Copy link
Contributor

ph commented Feb 11, 2015

Concerning the pipeline, we have a few PR in the work like this one
#2477

Logstash should be more resilient for theses kind of errors, We are working hard on this :)

@pulecp
Copy link
Author

pulecp commented Feb 11, 2015

I'm thinking about why I'm encoding it :-/. It's hostname of checked machine. I probably thought that I will need to encode spaces and another characters.

You can close this issue. Thanks for help

@ph ph closed this as completed Feb 11, 2015
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

No branches or pull requests

2 participants