Help developing a ruby plugin


(gmack) #1

Can anyone guide me towards a really good sample output plugin with the latest version? Everything online I've seen appears old with a different structure. Likely a newbie mistake but appreciate the help

thanks in advance


(Magnus B├Ąck) #2

Have you read https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin.html and used the plugin generator command?


(gmack) #3

Hi , yes I've used the plugin generator and walked through the tutorial. It builds and and I'm able to install the plugin to logstash. I setup a conf file using the output plugin. Logstash starts and nothing really seems to happen. I've added stouts and puts to the plugin to try to get some feedback but nothing. I also noticed that the plugin template from the generator is different to the code in the link you provided which is confusing. I've tried both ways with the same result. Stock output plugins work just fine so it's something with my plugin. Thanks for responding. If you have any further suggestions I'd be very greatful.

Cheers,
Garry


(gmack) #4

Finally figured it out. I had installed ruby prior to jruby which apparently is a bad thing to do. I setup a new server and only installed jruby and bam it worked first time.

Not an easy one to figure out since there was zero feedback in logs, stdout etc . I hope this saves someone else time and frustration.


(system) #5

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