rsyslog
May 12, 2008 - 04:52 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 66 unlogged users and 0 registered users online.

You are an anonymous user. You can register for free by clicking here

Topic: FAQ

The new items published under this topic are as follows.
How to separate log files by host name of sending device?
Question:
I have activated remote logging and receiving syslog messages from several devices. I want to write a separate log file for each device sending syslog messages. How to achieve that?

Answer:
It is pretty easy. You can use dynaFiles for it. With them, you specify a template as the file name. For each message, the filename is re-generated and the output written to the respective file. Read the config file doc for details, but it basically is:

$template DynaFile,"/var/log/system-%HOSTNAME%.log"
*.* -?DynaFile


Posted by  mmeckelein  on  Friday, October 20, 2006 2604
 Send this story to someone Printer-friendly page 

How to automatically delete database contents?
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.


Posted by  rgerhards  on  Tuesday, November 15, 2005 3737
 Send this story to someone Printer-friendly page 

Does rsyslog support RFC3195/COOKED?
Rsyslog support RFC3195 RAW and COOKED. The COOKED profile does not support PATH elements, but there is also currently no sender known to use them.


Posted by  rgerhards  on  Thursday, October 20, 2005 1986
 Send this story to someone Printer-friendly page 

Build problems with 0.9.6
Bennett Todd has just alerted me of some problems with the new release. In short: the build process seems not to work at all (nor does the install do).

This is actually a documentation issue. The way of compiling rsyslog has changed slightly but importantly. You need to CD into an distribution-specific subdirectory (use linux of in doubt) and then call make. Do NOT do this in the root directory of the rsyslog project.


Posted by  rgerhards  on  Tuesday, August 09, 2005 2904
Read full article: 'Build problems with 0.9.6' (533 bytes more)  Send this story to someone Printer-friendly page 

Preserving syslog sender over NAT
Question:
I have a number of syslog clients behind a NAT device. The receiver receives syslog messages that travelled over the NAT device. This leads the receiver to believe that all messages originated from the same IP address. With stock syslogd, I can not differentiate between the senders. Is there any way to record the correct sender of the message with rsyslog?


Answer:
OK, I've now had some real lab time. The good news in short: if you use rsyslog both on the senders as well as on the receiver, you do NOT have any problems with NAT.

To double-check (and out of curiosity), I also tried with stock syslogd. I used the ones that came with RedHat and FreeBSD. Neither of them reports the sending machine correctly, they all report the NAT address. Obviously, this is what made this thread appear, but it is a good verification for the correctness of my lab.


Posted by  rgerhards  on  Thursday, July 28, 2005 4505
Read full article: 'Preserving syslog sender over NAT' (1623 bytes more)  Send this story to someone Printer-friendly page 

 Search
 
Google

 Last Forum Posts
 
LAST FORUM POSTS
goto Postdate format(0)
 by ojan
 on 10. May at 02:15
goto Posttwo rsyslog instance...(0)
 by jli
 on 10. May at 02:01
goto Postrunning as an altern...(5)
 by jli
 on 10. May at 00:56
goto PostIssue with Modules(2)
 by vage
 on 09. May at 20:05
goto Postif ... then ... else(6)
 by sandiso
 on 09. May at 19:07

[Access Forum]


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


 Past Articles

:: Syndication: ::
Page created in 0.153825044632 seconds.