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?
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.