To enable reliable disk-based buffering, use the disk-buffer(reliable(yes)) parameter in the destination. Use reliable disk-based buffering if you do not want to lose logs in case of reload/restart, unreachable destination or syslog-ng OSE crash. This solution provides a slower, but reliable disk-buffer option. It is created and initialized at startup and gradually grows as new messages arrive. The filename of the reliable disk buffer file is the following: <syslog-ng path>/var/syslog-ng-00000.rqf.
Example: Example for using reliable disk-based buffering
destination d_BSD {
network("127.0.0.1"
port(3333)
disk-buffer(
mem-buf-size(10000)
disk-buf-size(2000000)
reliable(yes)
)
);
};
For details on the differences between normal and reliable disk-based buffering, see also About disk queue files.
If the reliable() option is not set, by default a normal disk-buffer is created. To explicitly enable the normal disk-buffer option, use the disk-buffer(reliable(no)) parameter in the destination. Use the normal disk-buffer option if you want a solution that is faster than the reliable disk-buffer option. In this case, the process 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.
Example: 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)
)
);
};
For details on the differences between normal and reliable disk-based buffering, see also About disk queue files.
This section describes how to get information about disk-buffer files used in syslog-ng Open Source Edition (syslog-ng OSE).
NOTE: While reading this section, consider that the default installation path used in the commands and syslog-ng OSE files is /opt/syslog-ng.
Topics:
This section describes information about disk-buffer files used in syslog-ng Open Source Edition (syslog-ng OSE).
The following list contains information about how disk-buffer files are used in syslog-ng OSE:
-
You can configure disk-buffer() for a remote destination in the destination() statement.
For more information about an example of configuring disk-buffer() for a remote destination in the destination() statement, see disk-buffer().
- By default, syslog-ng OSE creates disk-buffer files under /opt/syslog-ng/var directory, unless dir() option is set in disk-buffer().
- The filenames are generated automatically by syslog-ng OSE with the extensions .qf for a normal disk-buffer and .rqf for a reliable disk-buffer.
- The disk-buffer file stores processed log messages in the format in which they would have been sent out to the destination, but doesn't store information about the destination.