RE: [syslog-ng] Logs rotate and compress but still log to compres sed file
I was testing things out at that point. Sorry for the confusion. Even when those lines are uncommented the logs still do not rotate. I guess I do not know how to kill the process. The syslog-ng pid never 'resets' itself when issuing the kill -HUP command. -----Original Message----- From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu] Sent: Tuesday, May 17, 2005 12:29 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Logs rotate and compress but still log to compressed file _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
I'm going to take a guess here (I've seen this before with other applications), but the HUP signal is just telling syslog-ng to reread it's config file. If the config doesn't change, syslog-ng doesn't close the file descriptors (and most likely only closes them if it needs a different file name), and thus the file stays open. I see two options. 1) Stop and start the syslog-ng server. This could lead to possibly missed logs during the ever so short outage. 2) Use syslog-ng to rotate your logs daily for you. Then rotate the logs from previous days. Rechtorik, Keith wrote:
I was testing things out at that point. Sorry for the confusion. Even when those lines are uncommented the logs still do not rotate. I guess I do not know how to kill the process. The syslog-ng pid never 'resets' itself when issuing the kill -HUP command.
-----Original Message----- From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu] Sent: Tuesday, May 17, 2005 12:29 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Logs rotate and compress but still log to compressed file
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Tue, 17 May 2005 14:13:40 MDT, Andrew Morris said:
2) Use syslog-ng to rotate your logs daily for you. Then rotate the logs from previous days.
I use: destination n_messages { file("/logs/$HOST/$YEAR/$MONTH/messages-$YEAR-$MONTH$DAY"); } find /logs -type f -mtime +30 ! -name '*.gz' -exec gzip {} \; find /logs -type f -mtime +180 -exec rm {} \; Or whatever floats your boat...
On Tue, 2005-05-17 at 14:13 -0600, Andrew Morris wrote:
I'm going to take a guess here (I've seen this before with other applications), but the HUP signal is just telling syslog-ng to reread it's config file.
If the config doesn't change, syslog-ng doesn't close the file descriptors (and most likely only closes them if it needs a different file name), and thus the file stays open.
Syslog-ng _always_ reopens files if it receives a HUP signal. -- Bazsi
Hi All ! I use FreeBsd and i always have some problemes ! Somebdy can post his syslog-ng.conf ? Thx ! Damien
participants (5)
-
Andrew Morris
-
Balazs Scheidler
-
Damien Michau
-
Rechtorik, Keith
-
Valdis.Kletnieks@vt.edu