Logstash test with rspec


I have issues getting fields set during filtering with rspec.
I created a post on stackoverflow:

Any clue on this strange behavior ?

I'm afraid I can't help with your RSpec woes, but for testing Logstash filter configurations I think you'll find https://github.com/magnusbaeck/logstash-filter-verifier easier to use than writing RSpec tests (full disclosure: I am the author of said tool). It's basically an automation wrapper around the Logstash command that you ran to verify your filter.


Since the explosion to multiple gems, testing grok requires specific config to load the patterns, correctly, the codebase just changed today to fix a related issue: https://github.com/logstash-plugins/logstash-filter-grok/pull/73/files

I suppose it could be used from your own spec

@magnusbaeck that's a nice tool I did not know about