[syslog-ng]FQDN in the destination
Nate Campi
syslog-ng@lists.balabit.hu
Wed, 30 Apr 2003 15:05:26 -0700
On Wed, Apr 30, 2003 at 02:24:32PM -0700, Glasser, Rob wrote:
> I'm trying to use the fully qualified domain name in my directory naming
> structure in a destination function. Here is what I have:
I do this:
use_fqdn(yes);
keep_hostname(yes);
use_dns(yes);
long_hostnames(off);
then..
destination hosts {
file(
"/var/log/HOSTS/$HOST/$FACILITY/$YEAR/$MONTH/$DAY/$FACILITY$YEAR$MONTH$DAY"
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)
template("$DATE $FULLHOST $MESSAGE [$FACILITY.$LEVEL]\n")
template_escape(no)
);
};
log {
source(src);
destination(hosts);
};
Works for me with 1.5.26 on debian woody.
--
Nate Campi http://www.campin.net