[syslog-ng]pulling data from a file
William Yodlowsky
wyodlows@andromeda.rutgers.edu
Fri, 13 Jul 2001 13:33:21 -0400
On Friday, July 13, Matt Okeson-Harlow wrote:
> this is all well and good, a fifo works just fine,
> only problem is that cnr rolls the log files over itself...
> any ideas on how to get a tail -f to reset and start reading the new file?
I think the Perl module File::Tail will do that. Better check CPAN
http://cpan.valueclick.com/authors/id/M/MG/MGRABNAR/
> On Fri, Jul 13, 2001 at 06:05:47PM +0200, Balazs Scheidler wrote:
> > 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.