LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2008, 12:34 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How can I get syslog-ng to put the logs in seperate files instead of tcpsyslog-ng.all


How can I get syslog-ng to put the logs in seperate files instead of tcpsyslog-ng.all?

Is it possible to seperate by server and log?

Ex:
server1/secure
server1/kernel.log
server2/secure
server2/kernel.log
or
server1.secure
server1.kernel.log
server2.secure
server2.kernel.log

TIA!
 
Old 04-13-2008, 04:20 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
sure, jsut use the $host variable as a directory or such like, it's all very implicit. you'll need to ensure that you have create_dirs(yes) to automatically sort that out, but just change the file destination to suit your needs.
 
Old 04-13-2008, 09:50 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Thanks! That worked.

Now I am using:
destination tcplocalhost {
file("/var/log/$HOST/$FACILITY-tcpsyslog-ng.all");
};
 
Old 04-14-2008, 09:14 AM   #4
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by acid_kewpie View Post
sure, jsut use the $host variable as a directory or such like, it's all very implicit. you'll need to ensure that you have create_dirs(yes) to automatically sort that out, but just change the file destination to suit your needs.
Question, I have the free version install now, are you using the free or paid version of syslog-ng?
 
Old 04-14-2008, 10:55 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'm using about 1000 copies of the open source branch.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid logs and syslog.conf porx Linux - Newbie 5 08-11-2008 08:58 AM
[PHP] Put code in a seperate file Ephracis Programming 7 10-10-2007 01:06 PM
syslog-ng doen't generating logs emailssent Linux - Newbie 3 03-09-2005 05:44 AM
Guarddog logs in syslog short101 Linux - Security 3 01-06-2005 01:31 AM
Getting logs from a remote syslog ganninu Linux - Newbie 4 09-10-2003 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration