Skip to content

Commit ee28ce3

Browse files
committed
multi-line-timeout() option added
Signed-off-by: mrgarris0n <gergely.karacsonyi@gmail.com>
1 parent 15f1c02 commit ee28ce3

File tree

6 files changed

+41
-0
lines changed

6 files changed

+41
-0
lines changed

_data/external_links.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ sn-docker-log:
9292
url: https://www.syslog-ng.com/whitepaper/logging-in-docker-using-syslogng8132325/
9393
title: [ "Logging in Docker using syslog-ng" ]
9494

95+
sn-ml-timeout:
96+
id: sn-ml-timeout
97+
url: https://www.syslog-ng.com/community/b/blog/posts/multi-line-timeout-making-sure-your-last-multi-line-message-is-not-lost
98+
title: [ "Multi-line-timeout: making sure your last multi-line message is not lost"]
99+
95100
sn-ose:
96101
id: sn-ose
97102
url: https://syslog-ng.com/
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## multi-line-timeout()
2+
3+
| Type:| time in seconds|
4+
|Default:| N/A|
5+
6+
*Description:* Specifies the time {{ site.product.short_name }} waits without reading new data from the source, before
7+
the last (potentially partial) message is flushed and sent through the pipeline as a LogMessage.
8+
9+
Since the multi-line source detects the end of a message after finding the beginning of the subsequent message
10+
(indented or no-garbage/suffix mode), this option can be used to flush the last multi-line message
11+
in the file after a multi-line-timeout()-second timeout.
12+
13+
There is no default value, so it must be explicitly configured. It should be a higher value than follow-freq(), so we recommend to set it to a multiple value of follow-freq().
14+
15+
### Example: multi-line-timeout()
16+
17+
```config
18+
source s_multi {
19+
file("/some/folder/events"
20+
multi-line-mode("prefix-garbage")
21+
multi-line-prefix('^EVENT: ')
22+
multi-line-timeout(10)
23+
flags("no-parse")
24+
);
25+
}
26+
```
27+
28+
For more details see the blogpost Multi-line-timeout: making sure your last multi-line message is not lost.

doc/_admin-guide/060_Sources/020_File/001_File_source_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The file() driver has the following options:
3535

3636
{% include doc/admin-guide/options/multi-line-suffix.md %}
3737

38+
{% include doc/admin-guide/options/multi-line-timeout.md %}
39+
3840
{% include doc/admin-guide/options/pad-size.md %}
3941

4042
{% include doc/admin-guide/options/program-override.md %}

doc/_admin-guide/060_Sources/030_Wildcard-file/000_Wildcard-file_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ available, set this option to **poll**.
124124

125125
{% include doc/admin-guide/options/multi-line-suffix.md %}
126126

127+
{% include doc/admin-guide/options/multi-line-timeout.md %}
128+
127129
{% include doc/admin-guide/options/pad-size.md %}
128130

129131
{% include doc/admin-guide/options/program-override.md %}

doc/_admin-guide/060_Sources/110_Pipe/000_Pipe_source_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The pipe driver has the following options:
3131

3232
{% include doc/admin-guide/options/multi-line-suffix.md %}
3333

34+
{% include doc/admin-guide/options/multi-line-timeout.md %}
35+
3436
{% include doc/admin-guide/options/optional.md %}
3537

3638
{% include doc/admin-guide/options/pad-size.md %}

doc/_admin-guide/060_Sources/230_stdin/000_stdin_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ The stdin() driver has the following options:
3636

3737
{% include doc/admin-guide/options/multi-line-suffix.md %}
3838

39+
{% include doc/admin-guide/options/multi-line-timeout.md %}
40+
3941
{% include doc/admin-guide/options/pad-size.md %}
4042

4143
{% include doc/admin-guide/options/program-override.md %}

0 commit comments

Comments
 (0)