From 17ebe121a906a25f94c1bf8f3571a41bcfbde83b Mon Sep 17 00:00:00 2001 From: abrennan89 Date: Fri, 13 Oct 2023 12:04:40 -0500 Subject: [PATCH] OBSDOCS-327: Fix logging kafka docs --- .../log-forwarding.adoc | 2 ++ ...r-logging-collector-log-forward-kafka.adoc | 20 ++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/logging/log_collection_forwarding/log-forwarding.adoc b/logging/log_collection_forwarding/log-forwarding.adoc index 084545c4bbea..e8e5a8aec8f1 100644 --- a/logging/log_collection_forwarding/log-forwarding.adoc +++ b/logging/log_collection_forwarding/log-forwarding.adoc @@ -34,6 +34,8 @@ include::modules/cluster-logging-collector-log-forward-fluentd.adoc[leveloffset= include::modules/cluster-logging-collector-log-forward-syslog.adoc[leveloffset=+1] +include::modules/cluster-logging-collector-log-forward-kafka.adoc[leveloffset=+1] + include::modules/cluster-logging-collector-log-forward-cloudwatch.adoc[leveloffset=+1] === Forwarding logs to Amazon CloudWatch from STS enabled clusters diff --git a/modules/cluster-logging-collector-log-forward-kafka.adoc b/modules/cluster-logging-collector-log-forward-kafka.adoc index a6a611cf2747..9cc75ee6e434 100644 --- a/modules/cluster-logging-collector-log-forward-kafka.adoc +++ b/modules/cluster-logging-collector-log-forward-kafka.adoc @@ -1,7 +1,13 @@ +// Module included in the following assemblies: +// +// logging/log_collection_forwarding/log-forwarding.adoc + +:_content-type: PROCEDURE + [id="cluster-logging-collector-log-forward-kafka_{context}"] = Forwarding logs to a Kafka broker -You can forward logs to an external Kafka broker in addition to, or instead of, the default Elasticsearch log store. +You can forward logs to an external Kafka broker in addition to, or instead of, the default log store. 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. @@ -75,11 +81,11 @@ spec: ** Optional: String. One or more labels to add to the logs. <14> Optional: Specify `default` to forward logs to the internal Elasticsearch instance. -. Optional: To forward a single output to multiple Kafka brokers, specify an array of Kafka brokers as shown in this example: +. Optional: To forward a single output to multiple Kafka brokers, specify an array of Kafka brokers as shown in the following example: + [source,yaml] ---- -... +# ... spec: outputs: - name: app-logs @@ -91,15 +97,15 @@ spec: - tls://kafka-broker1.example.com:9093/ - tls://kafka-broker2.example.com:9093/ topic: app-topic <3> -... +# ... ---- <1> Specify a `kafka` key that has a `brokers` and `topic` key. <2> Use the `brokers` key to specify an array of one or more brokers. -<3> Use the `topic` key to specify the target topic that will receive the logs. +<3> Use the `topic` key to specify the target topic that receives the logs. -. Create the CR object: +. Apply the `ClusterLogForwarder` CR by running the following command: + [source,terminal] ---- -$ oc create -f .yaml +$ oc apply -f .yaml ----