2.14. Using disk-based buffering

The Premium Edition of syslog-ng stores messages on the local hard disk if the central log server or the network connection to the server becomes unavailable. The syslog-ng application automatically sends the stored messages to the server when the connection is reestablished. The disk buffer is used as a queue: when the connection to the server is reestablished, syslog-ng sends the messages to the server in the order they were received.

[Note] Note

Disk-based buffering can be used in conjunction with flow-control. See Section 2.13, “Managing incoming and outgoing messages with flow-control” for details.

Disk buffers can be used with tcp(), tcp6(), syslog() (when using the tcp or tls transport methods), and sql() destinations. Every such destination uses a separate disk buffer (similarly to the output buffers controlled by log_fifo_size()). The hard disk space is not pre-allocated, so ensure that there is always enough free space to store the disk buffers even when the disk buffers are full.

If syslog-ng is restarted (using the /etc/init.d/syslog-ng restart command), it automatically saves any unsent messages of the disk buffer and the output queue. After the restart, syslog-ng sends the saved messages to the server. In other words, the disk buffer is persistent.

The syslog-ng application handles outgoing messages the following way:

Handling outgoing messages in syslog-ng PE

Figure 2.12. Handling outgoing messages in syslog-ng PE



© 2007-2008 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com