[syslog-ng] diskqueue framework patch

Balazs Scheidler bazsi at balabit.hu
Sat Apr 2 10:50:36 CEST 2011


On Thu, 2011-03-31 at 17:38 +0200, Nagy Attila wrote:
> On 2011-03-29 13:31, Balazs Scheidler wrote:
> > Hi,
> >
> > On Mon, 2011-03-28 at 14:29 +0200, Nagy Attila wrote:
> >> Hi all,
> >>
> >> due to the need for disk queue usage in PE 4.1 we had to extend the
> >> syslog-ng sources, in order to be able write plugins that implement this
> >> feature. This patch contains these modifications.
> >> Basically it extends the 'class' hierarchy (and 'virtual' functions, see
> >> the new LogDestDriver) so that plugins can define their own queue
> >> mechanisms (as some do this in PE modules) and these special queues can
> >> be assigned to destinations.
> > Before going into technical details, can you please elaborate on what
> > additional use of this patchset might have in the syslog-ng OSE
> > context?
> >
> > If I understand correctly it introduces the concept of
> > per-destination-driver plugins, so that queue initialization can be
> > delegated to a plugin (e.g. disk based queueing).
> >
> > Can you perhaps shed some light on what other use-cases this could
> > solve?
> >
> Hi,
> 
> the purpose of this framework is that it enables us to extend the 
> standard queuing mechanism.
> The default queue stores the messages temporarily in the memory (for 
> xmpl if we can't send everything without exceeding the flow control) - 
> the implementation is in logqueue.c.
> This patch introduces a new layer where the actual queue implementation 
> can replace the default one - with fitting into the plugin structure.
> An example: the current implementation uses the GQueue to store the 
> messages. If somebody can write a better container (even for special 
> cases/circumstances), this patch makes it possible without having to 
> lose the default one. We can access both the 'old' and these new 
> implementations from the configuration file.

I'd also want to pluinize the "suppress()" functionality and perhaps
throttle() too, so that we don't have to implement them in every
separate plugin.

I'm going to read the code, and see if it is possible with that.

-- 
Bazsi




More information about the syslog-ng mailing list