[syslog-ng] [Bug 129] New: Add ability to synchronously flush logs on demand

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Fri Jul 22 20:31:05 CEST 2011


https://bugzilla.balabit.com/show_bug.cgi?id=129

           Summary: Add ability to synchronously flush logs on demand
           Product: syslog-ng
           Version: 1.6.x
          Platform: All
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: fermulator at sympatico.ca
Type of the Report: enhancement
   Estimated Hours: 0.0


As per the below e-mail thread with Bazsi, I was trying to figure out why syslog-ng doesn't write logs immediately.  As I discovered syslog-ng by default has
the concept of “flush_timeout” and “flush_lines”, where flush_timeout is how frequently we'll write logs (default 10s), and flush_lines is the maximum
number of lines we'll hold in the buffer before writing (default 10,000).

Currently, there is no way to synchronously force syslog-ng to "write logs now".

This ticket is an enhancement to syslog-ng to add the ability, in a synchronous way, ask syslog-ng to flush the buffer now, writing all logs in the
queue/buffer immediately/ASAP, and block until the operation is completed.

Version Information:
 * syslog-ng 1.6.8
 * FreeBSD 6.1

-----------
From: bazsi at balabit.hu
To: fermulator at sympatico.ca
Subject: Re: Flush (write logs now) for syslog-ng?
Date: Fri, 22 Jul 2011 06:31:36 +0200

hi,

we do have a bugzilla at bugzilla.balabit.com, however it's primarily used for bug reports. you can file enhancement requests though.

----- Original message -----
> Thanks for the reply.
>
> I tried SIGHUP, and as you mentioned, it's not synchronous.  syslog-ng
> does write the logs, but only after a few seconds (presumably this is
> less than the timeout though at least).
>
> Do you have any "ticket system", that has the "enhancement" to do this
> synchronously that I could reference?
>
> ~Matt
>
>
> -------- Original Message --------
> From: Balazs Scheidler <bazsi at balabit.hu>
> Sent: Thu 21 Jul 2011 02:31:24 PM EST
> To: Fermulator Fermulator <fermulator at sympatico.ca>
> Cc:
> Subject: Re: Flush (write logs now) for syslog-ng?
>
> > hi,
> >
> > sending a SIGHUP should flush all buffers. this is not synchronous
> > though, so you have to sleep some time to let syslog-ng do the thing.
> >
> > we have plans to add both on-demand synchronous reloads and config
> > file flushes.
> >
> > ----- Original message -----
> > >
> > >
> > >
> > > Hi Bazsi,
> > >
> > >
> > >
> > > I hope you don’t mind, I was trying to search for this in
> > > the syslog-ng mail archives, but couldn’t find my answer, and found
> > > your e-mail in the process.
> > >
> > >
> > >
> > >
> > > As I understand it, syslog-ng has “flush_timeout” and “flush_lines”
> > > parameters which determine how often we write out the buffer/queue of
> > > log messages, and what the maximum number of lines is that we’ll
> > > buffer, respectively.
> > >
> > >
> > >
> > >
> > >
> > > I’m trying to figure out: How can I tell syslog-ng to “write
> > > logs now” on demand?  (i.e. I
> > > have a script that upon failure, scrapes some log files … but
> > > instead of waiting for the flush_timeout, I’d rather “poke”
> > > syslog-ng to “write all logs now” (i.e. temporarily set the
> > > flush_timeout to 0, or temporarily set the flush_lines to 0)
> > >
> > >
> > >
> > > Is it possible?
> > >
> > >
> > >
> > > Thanks so much
> > >
> > >
> > > ~Fermulator
> > > (Matt Callaghan)
> > >
> >


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list