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
The source file lost #1774
Comments
Yes: with recently enough syslog-ng there is a reopen command for syslog-ng, which does not do a full reload, only the files are reopened. See PR #1530 and #1700. Alternatively, file destination supports template for filename. The filename can depend on the current time, thus messages are automatically written to another file based on current time. This can be an alternative to logrotate.
but there are |
@furiel so what's the reopen command ? My config is like this:
|
It is a recent addition to syslog-ng, unfortunately not yet in the documentation. It is intended to use in the logrotate scripts instead of reload, because reload is relatively heavy. Reopen just reopens the destination files: sources, destinations parsers are not reinitialized.
This command also connected to the SIGUSR1 signal. So alternatively you can send SIGUSR1 to the syslog-ng process. It should do the same. |
So, how to send |
@furiel So how to send SIGUSR1 to the syslog-ng process. I didn't find the doc. |
The command tests ok.
|
The reopen feature is available only from 3.12.1. Either with syslog-ng-ctl reopen or with sigusr1. |
@furiel thanks. |
This works too (referring to my "Option 2" below), and is clearer in my opinion: Call any one of these commands after performing a
|
When using logrotate, the source file is renamed, causing the source file to be lost. You need reload syslog-ng, and the source files can be re generated. Is there a better way?
The text was updated successfully, but these errors were encountered: