[syslog-ng] Re: Small conf suggestion

Balazs Scheidler bazsi@balabit.hu
Tue, 13 Jul 1999 10:17:23 +0200


On Mon, Jul 12, 1999 at 09:01:21PM -0700, joey miller wrote:
> I'm currently evaluating syslog-ng for use as a central syslog server in
> our facilities, and have come across something that may cut down similar
> setups (config file wise) like what I'm implementing by a large margin.
> 
> I plan to have multiple hosts log back to a single syslog-ng server, and
> am going to keep each machine/Cisco's logs seperated in a structure such
> as:
> /var/log/machine1.inficad.com/messages
> /var/log/machine1.inficad.com/daemon.log
> /var/log/routerX.inficad.com/messages
> .. etc ..
> 
> However, I've noticed it's going to require multiple (somewhat redundant)
> destination {} entries to get this going the way I'd like.  What I was
> thinking was something along the lines of allowing a replacable string in
> a file(); definition.  For example, I could do:
> 
> destination d_auth { file("/var/log/$HOST/auth.log"); };
> 
> This would allow me to have a single entry for the d_auth destination,
> instead of requiring a seperate destination{} entry for each machine + log
> level.
> 
> If there is something like this available already, please let me know, as
> I'm still exploring the syslog-ng package and haven't even begun to
> exploit its full potential yet.

It is not available yet, but as it has already been suggested by at least 3
people, I'll implement this in 1.3.x series. For now you have to stick to
several destination fields. To make this problem easier to maintain, simply
write a shell script or such to generate the config file.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt