[syslog-ng] Log Rotation
Mirwan
erwan.miran at gmail.com
Thu Sep 6 20:02:46 CEST 2007
For Mysql, you can have better performance using the ARCHIVE engine (data
are compressed but delete queries aren't available and select queries take
much more time than Myisam..) combined the partionning feature (based on the
day of year's parity or something...) in 5.1 version.
You won't need to lock any table, just drop the partition and recreate it.
It doesn't change anything about password security issues ;-)
Regards
Erwan
2007/9/6, Alexander Clouter <ac56 at soas.ac.uk>:
>
> Hi,
>
> Alexander Clouter <ac56 at soas.ac.uk> [20070906 14:15:58 +0100]:
> >
> > Hi,
> >
> > [snipped]
> >
> > ======
> > USE cheese-database;
> > LOCK TABLES chedder READ;
> > DELETE........;
> > UNLOCK TABLES;
> > ======
> >
> replace 'READ' with 'WRITE', or even 'LOW_PRIORITY WRITE'.
>
> D'oh :)
>
> > Then 'echo -e "[client]\npassword=<password>\n" > ~/.my.cnf' and then
> you
> > run (in a cron job):
> >
> > $ cat cmds.sql | mysql -u <user>
> >
> just so you know, this all came from:
>
> http://dev.mysql.com/doc/refman/5.1/en/password-security.html
>
> Cheers
>
> Alex
>
> > > -----Original Message-----
> > > From: syslog-ng-bounces at lists.balabit.hu [mailto:
> syslog-ng-bounces at lists.balabit.hu] On Behalf Of Geller, Sandor (IT)
> > > Sent: Thursday, September 06, 2007 6:10 AM
> > > To: Syslog-ng users' and developers' mailing list
> > > Subject: Re: [syslog-ng] Log Rotation
> > >
> > > Hello,
> > >
> > > > I am logging locally to
> > > >
> > > > destination hosts {
> > > > file("/opt/log/HOSTS/$YEAR/$MONTH/$DAY/$HOST/$PROGRAM"
> > > > owner(root) group(root) perm(0600) dir_perm(0700)
> create_dirs(yes));};
> > >
> > > Why do you want to rotate these??? New files will be created every
> > > day. Simply delete the old ones if you need to reclaim space.
> > >
> > > > I am also logging to a mysql database
> > > >
> > > > destination d_mysql { pipe("/tmp/mysql.pipe" template("INSERT
> > > > INTO logs (host, facility, priority, level, tag, date, time,
> > > > program, msg) VALUES ('$HOST', '$FACILITY', '$PRIORITY',
> > > > '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC',
> > > > '$PROGRAM', '$MSG');\n") template-escape(yes)); };
> > >
> > > Sorry, I still don't understand what do you want to achieve.
> > >
> > > Log rotation or log retention ?
> > >
> > > regards,
> > >
> > > Sandor
> > > --------------------------------------------------------
> > >
> > > NOTICE: If received in error, please destroy and notify sender. Sender
> does not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.
> > > _______________________________________________
> > > syslog-ng maillist - syslog-ng at 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 at 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 at 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 at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20070906/cfa93043/attachment.htm
More information about the syslog-ng
mailing list