You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to collect log files using Vector's file source. However, this keeps the file open indefinitely, resulting in umount actions getting denied. This issue occurs even when the file writer process has been stopped, as Vector continues to read the file. Is there any way to follow the logs without preventing umount actions?
Assuming I am using tail, the above problem is partially fixed when I use inotifywait. However, how can I fix this issue with Vector?
#!/bin/bash
logfile="/path/to/logfile"
# Monitor the file for changes and output new content when modified
inotifywait -m -e modify "$logfile" |
while read path action file; do
echo "File $file was modified. Showing new content:"
tail -n 10 "$logfile"
done
A note for the community
No response
Problem
I'm trying to collect log files using Vector's file source. However, this keeps the file open indefinitely, resulting in umount actions getting denied. This issue occurs even when the file writer process has been stopped, as Vector continues to read the file. Is there any way to follow the logs without preventing umount actions?
Configuration
Reproduction Steps
vector writer:
vector reader:
When I stop the Vector writer and try to
umount ./data
, I get theerror: umount: /opt/test/data: target is busy.
Version
vector 0.44.0 (x86_64-unknown-linux-gnu 3cdc7c3 2025-01-13 21:26:04.735691656)
The text was updated successfully, but these errors were encountered: