Want to run ruby filter external script from command line


(Brandon Biondo) #1

I use the LogStash::Event object in my script. It all goes great until I try to run it outside of a running Logstash instance. I get a huge set of errors while trying to load the libraries and I can't seem to untangle the huge interconnected dependency mess.

Is there a quick/easy way to get Logstash gems included when running a ruby script on its own?


(Ry Biesemeyer) #2

No. Logstash isn't pure Ruby, and it is not possible to load portions of it without also requiring all of the interconnected JRuby/jvm/java bits.

If your script is to be used in both places, the LogStash::Event#to_hash or LogStash::Event#to_hash_with_metadata can be used to extract the contents of the event into a plain Hash.


(system) closed #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.