[syslog-ng] feature request?: monitor open logs for deletion/rename

Balazs Scheidler bazsi77 at gmail.com
Thu Jul 12 11:22:12 CEST 2012


hi,

no need to use inotify for this. merely stating the file regularly should indicate the new file with a changed inode number.

i was thinking about a separate operation to reopen files (e.g. syslog-ng-ctl reopen-files) to avoid having to reload the configuration, but this idea seems simpler to implement.

----- Original message -----
> Patrick Hemmer <syslogng at stormcloud9.net> writes:
> 
> > Something which I think would be an awesome feature would be to
> > monitor   open file destinations for the file being renamed or deleted,
> > and then   reopen the file in such an event. The benefit of this is
> > that when doing   log rotation, you don't have to SIGHUP syslog-ng to
> > make it re-open   files. It would also make it so that all destination
> > buffers don't have   to be flushed and reopened, just the single file
> > destination.
> > 
> > The only downside is portability as not all OSs support the same way
> > of   doing this. On linux this can be easily done through inotify, and
> > it   looks like the BSD equivalent is kqueue (though I have pretty much
> > no   BSD experience). For platforms which there isn't a good method, we
> > could   instead fall back to a simple polling.
> 
> I've been thinking about something similar recently, though, my desire
> started from a completely different angle: I'd love to have wildcard
> file sources, and possibly other stuff (like allow some macros in file
> sources, though that opens up a nasty can of worms).
> 
> That needs some kind of monitoring too, and if sources have it, we can
> reuse the same thing for similar tasks on the destination side too.
> 
> I planned to write an RFC (with a little bit more detail about how I
> imagine it would work, and what good things it'd bring us) about this in
> the next day or two, but the rabbit's out the hat now. On the flip side,
> I originally didn't think about how file monitoring could be used for
> destinations, but your mail enlightened me - thank you!
> 
> -- 
> |8]
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng FAQ:
> http://www.balabit.com/wiki/syslog-ng-faq
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20120712/90e401d0/attachment.htm 


More information about the syslog-ng mailing list