[syslog-ng]pulling data from a file

Balazs Scheidler bazsi@balabit.hu
Fri, 13 Jul 2001 18:05:47 +0200


On Fri, Jul 13, 2001 at 10:49:32AM -0500, Matt Okeson-Harlow wrote:
> i have a question about syslog-ng and it's ability to pull from a non syslog
> file,
> 
> i have a cisco network registrar dhcp server that is looking to 
> /var/nwreg2/logs/name_dhcp_1_log (standard location)
> on Solaris 2.7
> 
> however when i have a source of
> source cnr { file("/var/nwreg2/logs/name_dhcp_1_log"); };
> nothing gets logged, i did some reading it seems people have tried using logger
> to get to these kind of log files (tail -f | logger) however either i am
> missing something or it does not work here, anyone have any ideas?
> btw, syslog-ng when it starts up gives a EOF error which i am assuming
> is because it is expecting the file to never end.
> 
> any ideas that anyone has would be appreciated

currently pulling data from a regular file is not supported. file() sources
are used with special files like /proc/kmsg. The problem with regular files
is that they always indicate readability, even if new data is not written to
them.

You could either use a tail -f | logger combination, or tail -f > namedpipe,
where namedpipe is listed as a pipe source in syslog-ng.conf.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1