Logstash plugin flush interval

(Karthikbox) #1

Hi all,

I've been writing a custom filter plugin for logstash.
I have a cleanup method which needs to be called periodically (lets say 3 sec).
I understand that this is achievable by overriding "flush" method in my plugin. How often will this method be called by LogStash? Is this time interval configurable? Any help would be appreciated.


(Pier-Hugues Pellerin) #2

Hello, yes if you are overriding the flush method the pipeline will call it every 5 second.
You can see the related code at https://github.com/ph/logstash/blob/master/lib/logstash/pipeline.rb#L160

Sadly the time is not configurable, if you need more granular settings you should implement this logic inside your filters.

(system) #3