central logfile / real time logging

Andreas Klemm andreas at freebsd.org
Wed Jan 23 10:25:55 PST 2008


Hi,

do you have an idea how to store application generated logfiles
(i.e. apache, ... ) from 1000 Solaris "zones" running on 250
physical Sun server onto a central FreeBSD logserver ?

There are 6 strong demands, which makes this setup very special
and tricky.

After many thinking and googeling I didn't find any OpenSource or
at least "not too expensive" solution which fulfills all of these
demands:

- "reliability", no logmessage may get lost
- on the central logserver the logfiles need to stay in separate files
  per virtual zone and application (can be the case the zone runs
  multiple services)
- "real-time logging", as soon as an application logrecord gets written
  on one of the 1000 zones this logmessage should be written immediately
  onto the central logserver. So its not sufficient to make this batched
  on an hourly base.
- applications may not write to NFS directly to prevent locking of apps
  if NFS server is unavailable (if solution should be NFS based).
- this solution needs to be aware of logfile rotation
  on the application server side (the 1000 zones)
- this logging needs to be done from the "global zone" of a Solaris server.

Some people seem to use syslog-ng for this on client and central
repository side.

But I see here some problems. I need to convert apache logs from
normal logfiles. This must happen from the Global Zones.

Then the syslog-ng on the central side has no chance (I think)
to demultiplex the logfile stream into logs separated by
the different zone and application.

On the Global Zones I need a process that tracks some logfiles
that are from different virtual zones.

I need to open one tcp session to central archive per logfile.

So ~250 global zones open ~1000 tcp sessions towards the central
FreeBSD server.

There must be a way to tell the application on central FreeBSD
Server, that this stream now should be written to a certain
subdirectory and filename, so that all is separate.

This application need to buffer on the Global zone, if the server
is not available. Or at least keep track, what hasn't been written
yet. And must be aware of logfile rotation.

Any idea ?

	Andreas ///

-- 
Andreas Klemm - Powered by FreeBSD 6
Need a magic printfilter today ? -> http://www.apsfilter.org/


More information about the freebsd-isp mailing list