Does the File source use poll or notify? #18131
-
I want to use File source to collect logs with low latency. However there are random several seconds (about 1s ~ 10s) delay on new contents in the log file. Here is my configuration file. Is there anything that I miss?
I use Ubuntu 16.04. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi @WuBingzheng , The |
Beta Was this translation helpful? Give feedback.
-
I read the source code and find that Why does it polls? Why does it not just read the file after being notified (e.g. by |
Beta Was this translation helpful? Give feedback.
Hi @WuBingzheng !
The initial implementation of the
file
source used a polling mechanism rather than inotify for easier cross-platform support and avoiding inotify flakiness (undelivered notifications). We have discussed using inotify to augment the discovery process on Linux though (used in addition to polling).