File: README.md

package info (click to toggle)
syslog-ng 3.19.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,176 kB
  • sloc: ansic: 114,472; makefile: 4,697; sh: 4,391; python: 4,282; java: 4,047; xml: 2,435; yacc: 1,108; lex: 426; perl: 193; awk: 184
file content (28 lines) | stat: -rw-r--r-- 756 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Threaded diskq source

This example source plugin reads messages from a `disk-buffer` file.

The driver opens a `disk-buffer` file in read-only mode and forwards its entire content.
After all messages have been read, the source starts to check for a new file periodically (`time-reopen()`).

You can remove the processed queue file or move a new one to the specified location (`file()`).

If you reload/restart syslog-ng, the source will resend everything from the beginning.

Note that this is a sample plugin, it is meant to be used only in debugging environments.

### Usage

```
source s_diskq {
  example-diskq-source(file("/var/disk-buffers/syslog-ng-00000.rqf"));
};

log {
  source(s_diskq);

  destination {
    file("/dev/stdout");
  };
};
```