-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tailing directory instead of specific file #276
Comments
Now it is possible to specify directory instead of file but outputs from all files in the directory are redirected to stdout of one tailing sidecar container, for example: apiVersion: v1
kind: Pod
metadata:
name: pod-with-annotations
namespace: tailing-sidecar-system
annotations:
tailing-sidecar: varlog:/var/log/*
spec:
containers:
- name: count
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "example0: $i $(date)" >> /var/log/example0.log;
echo "example1: $i $(date)" >> /var/log/example1.log;
echo "example2: $i $(date)" >> /var/log/example2.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: varlog
mountPath: /var/log
volumes:
- name: varlog
emptyDir: {} then tailing sidecar is added to the Pod:
and logs from tailing sidecar container has this form:
I have a doubt if at this moment it is possible to make the solution to read files from directory and redirect them to stdout of different containers as Fluent Bit with out_gstdout plugin is used to read log files and write records to the stdout. |
Hey @kkujawa-sumo , My folder structure looks something like:
If the directory used in |
For nested structure of directories, you can use comma separated list of directories:
the path in configuration can be set to any format accepted by Fluent Bit Tail plugin, please see also documentation of Path parameter in https://docs.fluentbit.io/manual/pipeline/inputs/tail/ |
It would be very handy to have functionality which would allow to tail whole directory, instead of file which has to be explicitly provided. For example:
This functionality does not work at the moment and i must provide exact file name which will be tailed:
The text was updated successfully, but these errors were encountered: