LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-07-2007, 01:33 PM   #1
Cheza
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
Remote Syslog-np server


I have a remote syslog-ng server currently up and running and I am currently trying to filter my logs so that each service is logged individually in its own directory.

For instance I have

Code:
destination remote {file("/var/log/remote.d/$HOST/$HOST.log");};
However all the services are included in 1 log file instead of seperate files. Anyone know the log/filter string I need to make this happen?
 
Old 11-07-2007, 06:13 PM   #2
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
As far as I know, you can use any of the macros defined in the source under src/macros.c.

Some of the more useful ones include: PROGRAM and FACILITY. Check out that source file for the complete list.

You might try a destination defined like $HOST/$PROGRAM.log or $HOST/$FACILITY.log. (I haven't tried this ... but it's there defined in the source, so I'd expect it to work...)

If your service doesn't give you a useful PROGRAM string but gives you other predictable things (or you just don't want a log for every service, just one for particular services), you could also define match filters. Campin.net has a bit of documentation about it that you might be interested in checking out.
 
Old 11-07-2007, 08:33 PM   #3
Cheza
LQ Newbie
 
Registered: Aug 2003
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you, that was the problem.
 
  


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
syslog server receives logs from remote device dwarf007 Linux - Security 3 01-24-2007 08:49 AM
loging syslog messages to a Remote Server nevxille Linux - Newbie 1 10-18-2006 07:12 AM
Syslog to a Remote Server Antonius_Block Linux - Software 1 05-06-2006 04:29 AM
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 07:21 PM
logging to a remote syslog server is dropping packets draeician73 Linux - Security 1 10-20-2004 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:55 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