Re: [syslog-ng]sync question, feature request
Dixit Wiktor Wodecki <wodecki@wapme-systems.de> (le Thu, 11 Jan 2001 14:41:18 +0100) : » I've got another question, I haven't really looked at the 1.5 tree yet, » but I think about making patch to syslog-ng which would include the » strftime functions. I want to be able to use things like $Y/$m/$d in the » destination file path, this would effectively eliminate logrotation » scripts. Is there such an effort already in work or is this feature » planned? Well. This is already coded if i'm not wrong. Use $YEAR, $MONTH, $DAY For example : destination all { file("/var/log/messages-$YEAR$MONTH$DAY" create_dirs(yes)); }; Nevertheless, I'm not sure that is really what you (and I) want. In my example, it creates files with the *dates of the syslog messages* what is different from the date of the day they are received. In my case, it seems I have syslog clients with unsynchronized clocks and I already have messages-20010704 for example (4th july 2001 !). Thierry
Thierry Besancon on Thu, Jan 11, 2001 at 03:35:35PM +0100: Hi,
Nevertheless, I'm not sure that is really what you (and I) want. In my example, it creates files with the *dates of the syslog messages* what is different from the date of the day they are received. In my case, it seems I have syslog clients with unsynchronized clocks and I already have messages-20010704 for example (4th july 2001 !).
I have requested the feature to change this behaviour some time ago, and Balasz made it come true shortly after, it's an option. use_time_recvd() boolean. Try this, Gregor. -- Gregor Binder <gregor.binder@sysfive.com> http://sysfive.com/~gbinder/ sysfive.com GmbH UNIX. Networking. Security. Applications. Gaertnerstrasse 125b, 20253 Hamburg, Germany TEL +49-40-63647482 PGP id: 0x20C6DA55 fp: 18AB 2DD0 F8FA D710 1EDC A97A B128 01C0 20C6 DA55
Hello, Thierry Besancon wrote:
destination all { file("/var/log/messages-$YEAR$MONTH$DAY" create_dirs(yes)); };
Nevertheless, I'm not sure that is really what you (and I) want. In my
yes, this what I wanted. I forgot about those macros when setting up my logging-server. I created the following destination directives: destination ganesh { file("/var/log/cluster/$YEAR$MONTH$DAY/ganesh"); }; destination shiv { file("/var/log/cluster/$YEAR$MONTH$DAY/shiv"); }; destination durga { file("/var/log/cluster/$YEAR$MONTH$DAY/durga"); }; So I wont have to logrotate them and it's easier for my check-scripts to handle the files. -- Regards, Wiktor Wodecki Unix-Administration Wapme Systems AG
participants (3)
-
Gregor Binder
-
Thierry Besancon
-
Wiktor Wodecki