[syslog-ng]1.9.3 bug proposal : resolving $HOSTS in destination
Gilles Demarty
syslog-ng@lists.balabit.hu
Mon, 28 Feb 2005 14:31:00 +0100
This is a multi-part message in MIME format.
--------------090201090602060700040906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
We have an issue on syslog-ng 1.9.3 on this following case :
when using the destination :
destination d_tag {file("/var/log/hosts/$HOST/$FACILITY
$YEAR-$MONTH-$DAY.$LEVEL");};
the following error appeared :
Error opening file for writing; error='No such file or directory (2)',
filename='localhost/var/log/hosts//mail 2005-02-28.notice'
The resolved filename looks bugged.
Here are the revelant debugging infos :
Incoming log entry; line='<21>Feb 28 15:24:46 logger: test'
Initializing destination file writer; filename='/var/log/messages',
template='/var/log/messages'
Initializing destination file writer;
filename='localhost/var/log/hosts//mail 2005-02-28.notice',
template='/var/log/hosts/$HOST/$FACILITY $YEAR-$MONTH-$DAY.$LEVEL'
Error opening file for writing; error='No such file or directory (2)',
filename='localhost/var/log/hosts//mail 2005-02-28.notice'
This bug produce rapidly a 99% CPU load, mainly because all the sources
are redirected to this "destination".
syslog-ng 1.6.4 don't produce the bug.
Attached is syslog-ng.conf that produce the bug. (ASCII \r\n format, sorry).
--
Gilles DEMARTY
ExaProtect Technology
Tél: +33 (0) 4 26 23 25 25
Fax: +33 (0) 4 26 29 99 09
email(at)exaprotect.com
www.exaprotect.com - "Be alert with your alerts"
--------------090201090602060700040906
Content-Type: text/plain;
name="syslog-ng.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="syslog-ng.conf"
options { sync(0);
create_dirs(on);
time_reopen (10);
log_fifo_size(1000);
long_hostnames (off);
keep_hostname (yes);
use_dns (off);
use_fqdn (off);
};
source s_sys { pipe ("/proc/kmsg" log_prefix("kernel: "));
unix-stream ("/dev/log");
internal();
};
source src { udp(ip(0.0.0.0));
};
destination d_tag { file("/var/log/hosts/$HOST/$FACILITY $YEAR-$MONTH-$DAY.$LEVEL");
};
destination d_dest {file("/var/log/messages");
};
log { source(s_sys);
source(src);
destination(d_dest);
};
log { source(s_sys);
source(src);
destination(d_tag);
};
--------------090201090602060700040906--