Comments (9)
Investigating the cases 41 and 42
For me, on Windows, the WORD definition was overriden by a pattern file in the logstash gem
jruby-1.7.17\lib\ruby\gems\shared\bundler\gems\logstash-2331739bb57e\patterns
as seen in the debug log
←[32mAdding pattern {"WORD"=>"\\b[2-5]\\b", :level=>:info, :file=>"/dev/tools/jruby-1.7.17/lib/ruby/gems/shared/gems/jls-grok-0.11.0/lib/grok-pure.rb", :line=>"62", :method=>"add_pattern"}←[0m
This file remains around because test creating it is failing too, see 46).
https://github.com/logstash-plugins/logstash-filter-grok/blob/master/spec/filters/grok_spec.rb#L671-L696
Any idea how to enforce the cleanup in rspec and reduce such side-effect?
from logstash-filter-grok.
In fact after removing the two last tests implying tempfiles and cleaning the pattern dirs in the gem, the full spec is reliably OK. So it is more an issue about running the spec on windows without tempfile side-effect than a bug in grok itself.
from logstash-filter-grok.
@wiibaa thx for the investigation. 👍 :)
from logstash-filter-grok.
Fixed in:
jordansissel/ruby-grok#16
#10
from logstash-filter-grok.
In my windows box I edited the installed grok-pure lib to ensure closing the file and then pulled pr/10 but I still get 9 failures: https://gist.github.com/jsvd/084f7fcd27508797923b
did I miss some other patch?
from logstash-filter-grok.
@jsvd you should have all the patch for this bug? I suggest you remove the gems reinstall them and use the patch. I think you may have some left over files when the tests had side effects.
from logstash-filter-grok.
I still get this issue after cloning logstash master, applying this PR and the ruby-grok patch manually.
https://gist.github.com/jsvd/51a8111a7d6ba3365868
from logstash-filter-grok.
Confirmed that manually deleting patterns in the patterns\
dir, applying the ruby-grok patch and this patch makes the tests pass inside logstash.
Maybe the test files should be generated in a temporary directory instead of patterns\
?
Otherwise LGTM
from logstash-filter-grok.
This is more like an integration test to make sure we can override the pattern in the pattern dir, the other files are generated in a tmp folder.
IMHO, We should revisit all the test examples of the grok filter to refactor them and to use Stud::Temporary
from logstash-filter-grok.
Related Issues (20)
- Allow grok pattern to be passed in as a parameter HOT 3
- Memory leak on 5.x
- Ability to auto-sort match options by frequency of match HOT 1
- getting values as an array HOT 1
- remove_field not working HOT 2
- "Prefix" functionality for grok HOT 4
- Track number of failed matches when using multiple pattern per field
- Warn when patterns don't have anchors HOT 1
- Significant Performance Regression using Jruby Timeouts HOT 8
- Implement ECS-Compatibility Mode HOT 4
- Logstash pipeline to remove passwords from log data HOT 1
- Using event fileds in configuration options HOT 1
- pure ruby regexp <capture:int> coercion does not work
- captures with same name won't coerce properly
- Logstash for iis SMTP
- Incoherent behavior of field references with overwrite
- [Test Failure] Syslog grok tests are failing on Logstash 8.x
- Behaviour when pattern writes to same input field (without "overwrite" option) HOT 1
- Add property to limit backtracking
- Regression on grok is case of match failure HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-filter-grok.