Logstash Output Plugin Batch Events / De-Register Method


I'm working on an output plugin for logstash and was wondering if the events that the ruby script receives can be batched (multiple events in place of the receive(event) method that gives a single event)?

(Magnus Bäck) #2

No, you'd have to do such batching internally.


Thanks, @magnusbaeck.

Do you know if there is a deregister method for the output plugins that is the opposite of register; something similar to the PreDestroy annotated methods in Java? I have a resource entity that I am planning on initializing in the register method but do not want to close it every time, since the batch won't be full in one receive call.

(Magnus Bäck) #4

I don't know, sorry.


Nm, there is a teardown method in the Plugin class that can be overridden for this purpose. Thanks!

(system) #6