I'm indexing local log-files with Logstash + ES and encountered a "buffer" issue: the last messages get sent to ES only after sending Ctrl-C to the LS-process, e.g.:
all logfiles are parsed: ES index - 96,521 hits
waiting and waiting... noting gets sent to ES
Hit Ctrl-C in the Logstash cmd window
22:04:57.939 [SIGINT handler] WARN logstash.runner - SIGINT received. Shutting down the agent.
22:04:57.976 [LogStash::Runner] WARN logstash.agent - stopping pipeline {:id=>"main"}
another events get sent: ES index - 96,919 hits
I've tried to experiment with the following parameters for ES output plugin:
flush_size => 1000
idle_flush_time => 1
but nothing changed: the last batch sits in LS until the process gets a stop command.
You should be able to set the auto_flush_interval in the codec to make this release the last event after a specific period of time instead of waiting indefinitely for a next line.
wow, that codec buffers too!
Thank you, guys! yes, the multi-line codes was holding data. I've set the parameter auto_flush_interval => 1 (I guess, one second is an appropriate value for a local FS input) and got all records indexed immediately.
Great support, really appreciate that!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.