On Tuesday 20 April 2010 08:38:51 abhay singh wrote:
Hi All,
I have made changes in syslog-ng.conf to redirect logs coming from other server to some specified log file and in some format
source s_external { udp(port(514)); }; source s_stunnel { tcp(ip(127.0.0.1) port(514)); };
destination s_external { file("/mydir/syslogs/$HOST_syslog.log" \ owner(user) group(group) perm(0600) dir_perm(0700) create_dirs(yes)); };
destination s_stunnel { file("/mydir/syslogs/$HOST/syslog.log" \ owner(user) group(group) perm(0600) dir_perm(0700) create_dirs(yes)); };
log { source(s_external); destination(s_external); }; log { source(s_stunnel); destination(s_stunnel); };
But my log file is being created with name "syslog.log" and not as "<hostnmae/ip>_syslog.log" neither $HOST directory made, what may be the issue?
Globle options are
option{
long_hostname(off); sync(0); }
Your sources and destinations have the same name. That is not allowed. Rename the destinations to d_<something> -- Alan McKinnon Systems Engineer^W Technician Infrastructure Services Internet Solutions +27 11 575 7585 Please note: This email and its content are subject to the disclaimer as displayed at the following link http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm. Should you not have Web access, send a mail to disclaimers@is.co.za and a copy will be emailed to you.