Skip to content

Commit 5587711

Browse files
authored
Merge pull request #66220 from abrennan89/OBSDOCS-327
OBSDOCS-327: Fix logging kafka docs
2 parents 25d264f + efcd556 commit 5587711

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

logging/log_collection_forwarding/log-forwarding.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ include::modules/cluster-logging-collector-log-forward-fluentd.adoc[leveloffset=
5454
5555
include::modules/cluster-logging-collector-log-forward-syslog.adoc[leveloffset=+1]
5656
57+
include::modules/cluster-logging-collector-log-forward-kafka.adoc[leveloffset=+1]
58+
5759
include::modules/cluster-logging-collector-log-forward-cloudwatch.adoc[leveloffset=+1]
5860
5961
ifdef::openshift-rosa[]

modules/cluster-logging-collector-log-forward-kafka.adoc

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
// Module included in the following assemblies:
2+
//
3+
// logging/log_collection_forwarding/log-forwarding.adoc
4+
5+
:_content-type: PROCEDURE
6+
17
[id="cluster-logging-collector-log-forward-kafka_{context}"]
28
= Forwarding logs to a Kafka broker
39

4-
You can forward logs to an external Kafka broker in addition to, or instead of, the default Elasticsearch log store.
10+
You can forward logs to an external Kafka broker in addition to, or instead of, the default log store.
511

612
To configure log forwarding to an external Kafka instance, you must create a `ClusterLogForwarder` custom resource (CR) with an output to that instance, and a pipeline that uses the output. You can include a specific Kafka topic in the output or use the default. The Kafka output can use a TCP (insecure) or TLS (secure TCP) connection.
713

@@ -75,11 +81,11 @@ spec:
7581
** Optional: String. One or more labels to add to the logs.
7682
<14> Optional: Specify `default` to forward logs to the internal Elasticsearch instance.
7783

78-
. Optional: To forward a single output to multiple Kafka brokers, specify an array of Kafka brokers as shown in this example:
84+
. Optional: To forward a single output to multiple Kafka brokers, specify an array of Kafka brokers as shown in the following example:
7985
+
8086
[source,yaml]
8187
----
82-
...
88+
# ...
8389
spec:
8490
outputs:
8591
- name: app-logs
@@ -91,15 +97,15 @@ spec:
9197
- tls://kafka-broker1.example.com:9093/
9298
- tls://kafka-broker2.example.com:9093/
9399
topic: app-topic <3>
94-
...
100+
# ...
95101
----
96102
<1> Specify a `kafka` key that has a `brokers` and `topic` key.
97103
<2> Use the `brokers` key to specify an array of one or more brokers.
98-
<3> Use the `topic` key to specify the target topic that will receive the logs.
104+
<3> Use the `topic` key to specify the target topic that receives the logs.
99105

100-
. Create the CR object:
106+
. Apply the `ClusterLogForwarder` CR by running the following command:
101107
+
102108
[source,terminal]
103109
----
104-
$ oc create -f <file-name>.yaml
110+
$ oc apply -f <filename>.yaml
105111
----

0 commit comments

Comments
 (0)