[syslog-ng] inserts into a sqlite3 database are not delayed

Balazs Scheidler bazsi77 at gmail.com
Wed Oct 15 10:56:39 CEST 2014


Hi,

It immediately runs the query, flush_lines() controls the transaction size,
which can be enabled using
flags(explicit-commits).

HTH
Bazsi


On Thu, Oct 9, 2014 at 6:08 PM, Davide Alberani <davide.alberani at gmail.com>
wrote:

> Hi,
> I'm using a SQLite 3 database as a destination,
> but it seems that the options to delay the insert
> of new rows are ignored.
>
> The destination is something like:
>
> destination sqlite_db {
>         sql(type(sqlite3)
>         flags('explicit-commits')
>         flush_timeout(60000)
>         log_fifo_size(1000)
>         flush_lines(1000)
>         retry_sql_inserts(2)
>         database("/tmp/logs.db")
>         [...table, columns, values, indexes definitions...]
> };
>
> Every time a log arrives, it's immediately written into
> the database, while I expected to have it delayed accordingly
> to flush_timeout and flush_lines.
>
> Currently I'm using syslog-ng OSE 3.4.2, but looking at
> the code of the latest version doesn't seem to have
> changed much.
> SQLite version is 3.8.4.
> libdbi 0.8.4
> libdbi-drivers 0.8.3
> libdbi-dbd-sqlite 0.8.3
> libol 0.3.16
> libevtlog 0.2.13
>
> Any idea about how to fix it?
>
>
> Thanks in advance,
>
> --
> Davide Alberani <davide.alberani at gmail.com>  [PGP KeyID: 0x465BFD47]
> http://www.mimante.net/
>
> ______________________________________________________________________________
> 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
>
>


-- 
Bazsi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20141015/3ab6ac21/attachment.htm 


More information about the syslog-ng mailing list