[buug] Consolidating access logs from Apache cluster

Ian Zimmerman itz at buug.org
Sat Apr 12 23:16:42 PDT 2008

Bill> I'm looking for a "best practices" approach to consolidating web
Bill> logs from a small (2 host) apache cluster.  It would be nice to
Bill> write all access and error log entries into a consolidated
Bill> directory.

One somewhat baroque and home-baked way that comes to mind is to write
an expect(1) script that tails (tail -f) each of the logfiles either
directly (for local files) or over ssh/rsh (for remote) and echoes from
whichever channel had latest input.

Because tail -f could lose some messages you could try to write a very
simple replacement for this case using the Linux specific epoll syscall.
(I happen to know Linux is your platform, on BSD it would be kqueue).

His stride expressed the man's pride and self-confidence
and his eyes revealed his honest simplicity.
His appearance indicated that his belly was of far greater importance
than his head.   Naguib Mahfouz, _Midaq Alley_

More information about the buug mailing list