1 |
On Monday 16 November 2009 17:55:51 Eray Aslan wrote: |
2 |
> On 16.11.2009 14:46, Neil Bothwick wrote: |
3 |
> > On Mon, 16 Nov 2009 09:05:18 +0200, Eray Aslan wrote: |
4 |
> >> - No need to logrotate with time based filenames. Hence, no need to |
5 |
> >> "kill -HUP" the syslog daemon. No missed logs. |
6 |
> > |
7 |
> > Then how do you get the server to use the new logfile names each |
8 |
> > day/week? |
9 |
> |
10 |
> It creates and uses a new file each hour/day/etc. Perhaps, you missed |
11 |
> the file(...) directive? Reposting for your reference: |
12 |
> |
13 |
> destination mail { |
14 |
> file("/var/log/mail/$YEAR/$MONTH/$DAY/$HOUR" |
15 |
> [...] |
16 |
> |
17 |
> > You only need to send a SIGHUP to the server using that log |
18 |
> > facility, so syslog would not be affected in your example. |
19 |
> |
20 |
> I can't parse this. The point is avoiding SIGHUP so that we do not miss |
21 |
> any log messages. |
22 |
> |
23 |
> OP asked how one manages log files without logrotate and the answer is |
24 |
> with time based file names. It has the additional benefit of avoiding |
25 |
> SIGHUP. |
26 |
> |
27 |
|
28 |
I have three machines that randomly kill syslog or syslog-ng as appropriate |
29 |
whenever they feel like it on daily rotates. There's no warning, no evidence, |
30 |
they just ... die. 5 minutes later nagios goes ballistic and I have work to |
31 |
do. That all three are SuSE machines is probably highly relevant. |
32 |
|
33 |
So, anything that syslog-ng can do itself without needing external |
34 |
intervention is a very good thing. I can then compress and move the closed |
35 |
files around later at my leisure in complete safety. |
36 |
|
37 |
-- |
38 |
alan dot mckinnon at gmail dot com |