Idle timeout and terminate for stdin source #1195
Labels
source: stdin
Anything `stdin` source related
type: bug
A code related bug.
type: help
User support and help.
Milestone
I found myself relying on the
timeout
command to prompt Vector into shutting down when used to read fromstdin
in parallel (about 7000 invocations).e.g.
find . -type f -name "*.log.gz" | xargs -P 12 -I % sh -c 'zcat % | timeout 15 vector --config /etc/vector/ingest.toml'
The
ingest.toml
would read fromstdin
and perform a small set of transforms before sinking to another vector instance where some metrics were extracted. I opted for this model since vector doesn't perform decompression for file type sources. Unfortunately Vector will remain open preventing the xargs loop from proceeding. Usingtimeout
here isn't something I'm necessarily comfortable with, but it did effectively allow me to process nearly 2 years of event logs.If the
stdin
source could be configured to trigger the shutdown of vector after some defined idle period (ensuring any batched sinks are flushed), processing historical logs can be done without foreknowledge relating to the processing time per file that vector would presumably take.The text was updated successfully, but these errors were encountered: