[syslog-ng] Get host IP inside source { file ( ); } driver

Tech Support support at voipbusiness.us
Thu Feb 26 17:39:26 CET 2015


    I use this and it works fine for me.


destination d_remotehosts {

    file( "/var/log/hosts/$YEAR/$MONTH/$DAY/$HOST/$FACILITY.log" perm( 0644 ) create_dirs( yes ) dir_perm( 0755 ) );






From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Thanuje Ashwin Nallaperuma
Sent: Thursday, February 26, 2015 1:33 AM
To: syslog-ng at lists.balabit.hu
Subject: [syslog-ng] Get host IP inside source { file ( ); } driver




I want to read a file which is in the name of the IP of syslog-ng client machine

I tried with $HOST macro 


source { file (/mnt/$HOST); };


But this does not work

Any help on doing this ?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20150226/81ddbffe/attachment.htm 

More information about the syslog-ng mailing list