I kept running into a wall trying to get a ruby file to work for a filter and I finally simplified my config file to simply this:
filter {
ruby {
code => "event.cancel"
}
}
But even with this simple example, running logstash.bat -t gives me the following:
The given configuration is invalid. Reason: uninitialized constant LogStashCompilerLSCLGrammar::LogStash::Compiler::LSCL::AST::Hash::ConfigurationError
Can anyone point me in the right direction to get a ruby filter to work at all? Same thing happening with fresh install of 6.2.2.
Well I should have gone further and simplified even more. I still received the error even after removing then entire ruby { } section which meant my issue was elsewhere. Sorry to waste viewing time. I found my issue with another filters add_field not working correctly. Lesson learned: Make one change at a time and test...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With