rsyslog
Jul 04, 2008 - 07:48 PM

Donate!
Satisfied with rsyslog?

Donate and help keep
the project alive!

Rainer's Blog

Login




 


 Log in Problems?
 New User? Sign Up!

Online
There are 22 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

FAQ
FAQ  :: How to automatically delete database contents? ::
(3969 Reads)  
Posted by rgerhards on Tuesday, November 15, 2005 - 09:31 PM

Rsyslog supports writing to the database. Like with log files, the rsyslogd writes the data, but does not delete (or export) it. If you need the data only for a period of time, simply deleting excess data might be a workable solution.

Below are some examples how this can be done (thanks to Michael Meckelein for posting this in the forum):

You can start a script via cron job, e. g.

mysql -u database-userid -pdatabase-password -e "truncate table SystemEvents" database-name

to delete all data or like

mysql -u database-userid -pdatabase-password -e "DELETE FROM SystemEvents WHERE ReceivedAt < date_add(current_date, interval -1 day)" database-name

to delete data older than one day.

Send this story to someone  Printer-friendly page
Only logged in users are allowed to comment. register/log in
 Search
 
Google

 Last Forum Posts
 · Re: Problem matching localhost
Mhhh... I think there is no generic way to do that in v2... Anyon ...
· Re: Problem matching localhost
Hi, You use expression filters as shown in http://www.rsyslog ...
· Problem matching localhost
Hi,I'm running 2.0.0-11 (version included with redhat 5.2)I want ...
· Re: .spec for RHEL5
Well, finally used the .spec from ftp://fr.rpmfind.net/linux/fedo ...
· Re: .spec for RHEL5
I have no idea at all of packages... but rsyslog is in RHEL 5.2 - ...

 Top Contributors
 
Contributor Contribs
varmojfekoj 7
Michael Biebl 2
Michel Biebl 1
Peter Vrabec 1



:: Syndication: ::
Page created in 0.121128797531 seconds.