8.3.2. Enabling normal disk-based buffering

The following destination drivers can use disk-based buffering: amqp(), elasticsearch2(), file(), hdfs(), http(), kafka(), mongodb(), program(), redis(), riemann(), smtp(), , sql(), stomp(), unix-dgram(), and unix-stream(). The network(), syslog(), tcp(), and tcp6() destination drivers can also use disk-based buffering, except when using the udp transport method. (The other destinations or protocols do not provide the necessary feedback mechanisms required for disk-based buffering.)

To enable normal disk-based buffering, use the disk-buffer(reliable(no)) parameter in the destination. Use normal disk-based buffering if you want a solution that is faster than the reliable disk-based buffering. In this case, disk buffering will be less reliable and it is possible to lose logs in case of syslog-ng OSE crash. The filename of the normal disk buffer file is the following: <syslog-ng path>/var/syslog-ng-00000.qf.

It is possible to use this option without using the disk-buffer plugin. In this case, use the log-disk-fifo-size() parameter in the destination.

Example 8.9. Example for using normal disk-based buffering

When using the disk-buffer plugin

destination d_BSD {
    network(
            "127.0.0.1"
            port(3333)
            disk-buffer(
                mem-buf-length(10000)
                disk-buf-size(2000000)
                reliable(no)
            )
        );
        }; 

Without disk-buffer plugin

destination d_BSD {
    network(
            "127.0.0.1"
            port(3333)
            log-disk-fifo-size(2000000)
            log-fifo-size(10000)
        );
}; 

For details on the differences between normal and reliable disk-based buffering, see also Section 8.3.4, About disk queue files.