[syslog-ng]1.9.3 bug proposal : resolving $HOSTS in destination

Gilles Demarty syslog-ng@lists.balabit.hu
Mon, 28 Feb 2005 15:46:16 +0100


Nate Campi wrote:
> On Mon, Feb 28, 2005 at 02:31:00PM +0100, Gilles Demarty wrote:
> 
>>Here are the revelant debugging infos :
>>
>>Incoming log entry; line='<21>Feb 28 15:24:46 logger: test'
> 
> 
> You haven't said what would you have it do when there's no hostname in
> the incoming message (as is the case here). Would you have it fall back
> to using the IP of the remote system? Maybe that's not a bad idea.
> 

The issue is not that the hostname is empty( well that's kind of issue 
too, but not the one I point out ;) ) , but that the resolve of the 
string is not perfomed correctly :
filename='localhost/var/log/hosts//mail 2005-02-28.notice'
           ^^^^^^^^^

I got the same, if I remove the $HOST/ in the destination string. The 
resulting filename is :
filename='mail/var/log/hosts/ 2005-02-28.notice'
	  ^^^^

I know, the title would have been : "[syslog-ng]1.9.3 bug proposal : 
resolving $... in destination" instead of $HOST, but well, that's less 
understanding.



> Anyways, the FAQ states that creating files based on hostnames in syslog
> messages is bad:
> 
>  http://www.campin.net/syslog-ng/faq.html#bad_filenames
> 
> ...and I happen to agree with it (oh wait - I wrote that! ;).

-- 
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"