Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-07-2007, 12:33 PM   #1
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

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, 05:13 PM   #2
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 16
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. has a bit of documentation about it that you might be interested in checking out.
Old 11-07-2007, 07:33 PM   #3
LQ Newbie
Registered: Aug 2003
Distribution: Slackware
Posts: 16

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


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

All times are GMT -5. The time now is 06:17 PM.

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