Replies: 1 comment 2 replies
-
Yes, I think so. Read from head only indicates what to do for that file when it is new or updated, it affects the behaviour of what happens on an update notification. Essentially tail functions as tail -f by default so this only gets "new" data, read from head says to read the whole file when this happens. You also have the Combining read-from-head and the db option does not seem right: the database is responsible for tracking the offset in the file it has read up to, if the file is new then it will read from the start (i.e. offset=0) but if not it will read from where it last stopped. There is no need to tell it to read from the start. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Before raising a bug, I'd like to try and confirm my observations.
TL;DR: A file with existing content will only be read and shipped from the beginning, if it is updated after being discovered.
A file that just appears and never gets updated does not get log lines processed.
Situation
Running cr.fluentbit.io/fluent/fluent-bit:4.0.7 on EKS as daemonset on ec2 nodes.
Pod is created that causes a new node to be created via autoscaling (so completely fresh instance of fluent-bit.
Pod is scheduled once fluent bit is started.
Config:
Observation
What I see is this: A service writes a log line and then does nothing. The file gets discovered by fluent-bit but since it's not updated, the existing content is not processed.
If the service is modified to repeat the line after 60s, fluent-bit receives an update notification for the file and only then processes starting from the beginning as configured with Read_from_Head.
Is this known behavior? Could this be found in the docs? Is there a purpose behind it?
I'd really appreciate any feedback on this, don't want to waste developers time if I'm completely missing the mark.
fluent-bit logs
Logs added to the file that is monitored
Beta Was this translation helpful? Give feedback.
All reactions