Is it possible to make a gem be used as an input and output plugin?


#1

I'm trying to debug a plugin that's attempting to sublcass LogStash::Outputs::ElasticSearch and overrides the submit() method. It also tries to act as an input plugin and overrides the run() method so it can feed events back into the queue. I added a log at the beginning of run() and it seems that it's never being called when I start logstash. The class is declared as:

class LogStash::Outputs::MyDedup < LogStash::Outputs::ElasticSearch

And lib/logstash_registry.rb contains:

require 'logstash/plugins/registry'
require 'logstash/outputs/elasticsearch'
require 'logstash/outputs/mydedup'

LogStash::Inputs.const_set 'MyDedup', LogStash::Outputs::MyDedup

I honestly have no idea what's going on in the logstash_registry.rb. Should this work? Thanks!


(system) #2

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