Skip to content

Commit c250d42

Browse files
authored
kafka: consolidate the mixed usage the kafka and kafka-c (#217)
Related: #212 Fixes: #216
2 parents 5b17a10 + cc3ae71 commit c250d42

File tree

6 files changed

+81
-42
lines changed

6 files changed

+81
-42
lines changed

_data/external_links.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,10 @@ gh-websense:
748748
url: https://github.com/syslog-ng/syslog-ng/blob/master/scl/websense/plugin.conf
749749
title: [ "Websense configuration snippet on GitHub" ]
750750

751+
gh-syslog-ng-cfg-helper:
752+
id: gh-syslog-ng-cfg-helper
753+
url: https://github.com/syslog-ng/syslog-ng-cfg-helper
754+
title: [ "syslog-ng-cfg-helper utility" ]
751755

752756
### Destinations, sources, parsers, templates ###
753757

doc/_admin-guide/050_The_configuration_file/006_Modules_in_syslog-ng/001_Listing_configuration_options.md

Lines changed: 62 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
title: Listing configuration options
33
id: adm-mod-list
44
description: >-
5-
Starting with {{ site.product.short_name }} 3.25, you can use the syslog-ng-cfg-db.py
5+
Starting with {{ site.product.short_name }} 3.25, you can use the syslog-ng-cfg-helper
66
utility to list the available options of configuration objects. For
77
example, you can list all the options that can be set in the file
88
source, and so on.
99
---
1010

11-
The syslog-ng-cfg-db.py utility has the following options:
11+
The syslog-ng-cfg-helper utility has the following options:
1212

1313
- The following command lists the contexts that the utility supports.
1414

1515
```bash
16-
syslog-ng-cfg-db.py
16+
syslog-ng-cfg-helper
1717
```
1818

1919
**NOTE:** Currently, sources and destinations are supported.
@@ -22,60 +22,88 @@ The syslog-ng-cfg-db.py utility has the following options:
2222
- The following command lists the available drivers of a context:
2323

2424
```bash
25-
syslog-ng-cfg-db.py -c <source|destination>
25+
syslog-ng-cfg-helper -c <source|destination>
2626
```
2727

2828
- The following command lists the available options of a specific
2929
driver and specifies the context and the driver:
3030

3131
```bash
32-
syslog-ng-cfg-db.py -c <source|destination> -d <driver>
32+
syslog-ng-cfg-helper -c <source|destination> -d <driver>
3333
```
3434

35-
For example, to list the options of the kafka-c() destination
35+
For example, to list the options of the kafka() destination
3636
driver:
3737

3838
```bash
39-
syslog-ng-cfg-db.py -c destination -d kafka-c
39+
syslog-ng-cfg-helper -c destination -d kafka
4040
```
4141

4242
The output includes the available options of the driver in
4343
alphabetical order, and the type of the option. For example:
4444

4545
```config
46-
destination kafka-c(
47-
bootstrap-servers/kafka-bootstrap-servers(<string>)
48-
client-lib-dir(<string>)
49-
config/option()
50-
config/option(<string> <arrow> <string-or-number>)
51-
config/option(<string> <string-or-number>)
52-
flush-timeout-on-reload(<number>)
53-
flush-timeout-on-shutdown(<number>)
54-
frac-digits(<number>)
55-
key(<string>)
56-
local-time-zone/time-zone(<string>)
57-
log-fifo-size(<number>)
58-
message/template(<string>)
46+
kafka-c(
47+
batch-lines(<nonnegative-integer>)
48+
batch-timeout(<positive-integer>)
49+
bootstrap-servers(<string>)
50+
config(
51+
<empty>
52+
<string> <string-or-number>
53+
<string> => <string-or-number>
54+
<string>(<string-or-number>)
55+
)
56+
disk-buffer(
57+
capacity-bytes(<number>)
58+
compaction(<yesno>)
59+
dir(<string>)
60+
disk-buf-size(<number>)
61+
flow-control-window-bytes(<nonnegative-integer>)
62+
flow-control-window-size(<nonnegative-integer>)
63+
front-cache-size(<nonnegative-integer>)
64+
mem-buf-length(<nonnegative-integer>)
65+
mem-buf-size(<nonnegative-integer>)
66+
prealloc(<yesno>)
67+
qout-size(<nonnegative-integer>)
68+
reliable(<yesno>)
69+
truncate-size-ratio(<nonnegative-float>)
70+
)
71+
fallback-topic(<string>)
72+
flags(
73+
<empty>
74+
<string>
75+
)
76+
flush-timeout-on-reload(<nonnegative-integer>)
77+
flush-timeout-on-shutdown(<nonnegative-integer>)
78+
frac-digits(<nonnegative-integer>)
79+
hook-commands(
80+
setup(<string>)
81+
shutdown(<string>)
82+
startup(<string>)
83+
teardown(<string>)
84+
)
85+
internal(<yesno>)
86+
key(<template-content>)
87+
local-time-zone(<string>)
88+
log-fifo-size(<positive-integer>)
89+
message(
90+
<template-content>
91+
<template-reference>
92+
)
5993
on-error(<string>)
6094
persist-name(<string>)
61-
poll-timeout(<number>)
62-
properties-file(<path>)
95+
poll-timeout(<nonnegative-integer>)
96+
retries(<positive-integer>)
6397
send-time-zone(<string>)
6498
sync-send(<yesno>)
65-
throttle(<number>)
99+
template-escape(<yesno>)
100+
throttle(<nonnegative-integer>)
101+
time-reopen(<positive-integer>)
66102
time-zone(<string>)
67-
topic(<string>)
103+
topic(<template-content>)
68104
ts-format(<string>)
69-
workers(<number>)
70-
config/option(
71-
<string>(<string-or-number>)
72-
)
73-
key(
74-
<identifier>(<string>)
75-
)
76-
message/template(
77-
<identifier>(<string>)
78-
)
105+
worker-partition-key(<template-content>)
106+
workers(<positive-integer>)
79107
)
80108
```
81109

doc/_admin-guide/070_Destinations/100_Kafka-c/000_Before_you_begin.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ The following example defines a kafka destination in the new C
4343
implementation, using only the required parameters.
4444

4545
```config
46-
@define kafka-implementation kafka-c
4746
@include "scl.conf"
4847
4948
destination d_kafka {

doc/_admin-guide/070_Destinations/100_Kafka-c/001_Shifting_from_Java_to_C.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: >-
77
configuration file and considerations are necessary.
88
---
99

10+
- `kafka()` and `kafka-c()` is now interchangable as the first one is just an alias of the latter
11+
1012
- Unlike the old one, the new topic() option can not handle templates.
1113
It must be a string.
1214

@@ -15,7 +17,7 @@ description: >-
1517
- The kafka-bootstrap-servers() option has been renamed
1618
bootstrap-servers().
1719

18-
- The properties-file() was replaced with the config() option of kafka-c, which is similiar but not identical to the properties-file() option.
20+
- The properties-file() was replaced with the config() option which is similiar but not identical to the properties-file() option.
1921

2022
- The sync-send() option has been deprecated. Remove it from the
2123
configuration file.

doc/_admin-guide/070_Destinations/100_Kafka-c/003_Kafka-c_options.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
---
2-
title: "Options of the kafka-c() destination"
2+
title: "Options of the kafka() destination"
33
id: adm-dest-kafkac-opt
44
description: >-
5-
This section describes the options of the kafka-c() destination in {{ site.product.short_name }}.
5+
This section describes the options of the kafka() destination in {{ site.product.short_name }}.
66
---
77

8-
The kafka-c() destination of {{ site.product.short_name }} can
8+
The kafka() destination of {{ site.product.short_name }} can
99
directly publish log messages to the Apache Kafka message bus, where subscribers can access them. The destination has the following options.
1010

11+
**NOTE:** `kafka()` and `kafka-c()` is now interchangable as the first one is just an alias of the latter
12+
{: .notice--info}
13+
1114
## Required options
1215

13-
To use the kafka-c() destination, the following two options are required: `bootstrap-servers()` and `topic()`. Both must appear at the beginning of your {{ site.product.short_name }} configuration.
16+
To use the kafka() destination, the following two options are required: `bootstrap-servers()` and `topic()`. Both must appear at the beginning of your {{ site.product.short_name }} configuration.
1417

1518
You can specify multiple, comma-separated addresses, demonstrated in the following example:
1619

doc/_admin-guide/070_Destinations/100_Kafka-c/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'kafka-c(): Publishing messages to Apache Kafka using the
2+
title: 'kafka(): Publishing messages to Apache Kafka using the
33
librdkafka client (C implementation)'
44
short_title: kafka
55
id: adm-dest-kafkac
@@ -13,7 +13,10 @@ As of {{ site.product.short_name }} version 3.21, the new C implementation of th
1313
destination is available. The new implementation uses the librdkafka
1414
client and has several advantages, such as scalability, more efficient
1515
memory usage and simpler setup. The options of this implementation are
16-
compatible with those of the old Java implementation.
16+
not exactly compatible with those of the old Java implementation, see
17+
Shifting from Java implementation to C implementation for the differences.
18+
Version 4.9.0 has dropped the Java implementation. kafka() and kafka-c() can now
19+
be used interchangeably; both refer to the single remaining C implementation.
1720

1821
## Figure 11: How the C implementation of the kafka destination works with {{ site.product.short_name }}
1922

0 commit comments

Comments
 (0)