fluentd
fluentd copied to clipboard
timer: Add immediate option to timer_execute
Enhancement request for input plugins.
By default, PluginHelper::Timer#timer_execute
launches timer immediately.
This is no problem on almost cases but some plugins, e.g. in_tail, takes long time in start
by executing code.
To avoid this problem, delaying timer execution mitigates this situation.
See also: https://github.com/fluent/fluentd/pull/1502
FWIW, I also want to use this option in Windows exporter.
- We use
timer_execute
to periodically collect system metrics (default interval is 60s). - I feel the current user experience is sub-optimal, because our user needs to wait 1 minute to confirm that the plugin is actually working.
I was considering to migrate to manual timer implementation because of this issue,
but it is preferable if timer_execute
supports immediate
option.