LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 01: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, 05:20 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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, 10: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, 10: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, 11:55 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:58 AM
[PHP] Put code in a seperate file Ephracis Programming 7 10-10-2007 02:06 PM
syslog-ng doen't generating logs emailssent Linux - Newbie 3 03-09-2005 06:44 AM
Guarddog logs in syslog short101 Linux - Security 3 01-06-2005 02:31 AM
Getting logs from a remote syslog ganninu Linux - Newbie 4 09-10-2003 10:05 AM

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

All times are GMT -5. The time now is 05:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration