Hey,
I'm using rsyslog[v8.31.0] to send logs from file, the thing is that the file is not exist right away and it takes time to be created(When OS is being created).
I got this error, and no logs are being sent from the file:
rsyslogd: imfile: error with inotify API, ignoring file '/home/some-file: No such file or directory [v8.31.0]
This issue is being fixed only if I restart the syslog service.
I suspect that imfile module tries to read the file few times and if it is not exist it stops to try.
Please assist.
mhhh.... I see your point, but I am not even sure this is a bug. imfile always worked on the assumption that the file must be existing.
A work-round may be to use a wildcard to describe that file. Could you do this?
@rgerhards I will check and update.
@rgerhards Hey, the error gone when using wildcard, but still I can't see the logs till I won't restart the service.
Any suggestions?
can you create a debug log? http://www.rsyslog.com/doc/v8-stable/troubleshooting/debug.html
I think this case is not handeled yet proberly.
We should create a test to see what happens when imfile starts monitoring a file that does not exist on startup and is created later.
@alorbach @rgerhards Another issue, When the file is being updated, no logs are being sent till the service is being restarted, look like the polling mode is not working. Any suggestions?
@mamash If it is actually a separate issue, it would make sense to create a separate issue (because of the workflow). But question: what does updated mean? Line appended? Truncated? It's a big difference...
@rgerhards Line appended.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.