[syslog-ng] Rediecting logs

abhay singh abhay.asingh at gmail.com
Tue Apr 20 08:38:51 CEST 2010


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);
}



-- 
Regards..
Abhay Singh..
91-98804-55587
Sr. Software Engineer.
Robust Designs India Pvt Ltd.
Bangalore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20100420/32d4d921/attachment.html 


More information about the syslog-ng mailing list