From 314661d37508dd39997ca98980b932f31688e646 Mon Sep 17 00:00:00 2001 From: Ashleigh Brennan Date: Wed, 20 Mar 2024 11:48:56 -0500 Subject: [PATCH] OBSDOCS-890: Fix bugs in syslog docs --- .../cluster-logging-collector.adoc | 4 +-- modules/log-collector-rsyslog-server.adoc | 36 +++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/logging/log_collection_forwarding/cluster-logging-collector.adoc b/logging/log_collection_forwarding/cluster-logging-collector.adoc index 3bc9ec8295a1..664a8df9ffc6 100644 --- a/logging/log_collection_forwarding/cluster-logging-collector.adoc +++ b/logging/log_collection_forwarding/cluster-logging-collector.adoc @@ -29,9 +29,9 @@ The service name is generated based on the following: * For multi log forwarder `ClusterLogForwarder` CR deployments, the service name is in the format `-`. For example, `example-http-receiver`. * For legacy `ClusterLogForwarder` CR deployments, meaning those named `instance` and located in the `openshift-logging` namespace, the service name is in the format `collector-`. For example, `collector-http-receiver`. -//include::modules/log-collector-rsyslog-server.adoc[leveloffset=+2] -// uncomment for 5.9 release include::modules/log-collector-http-server.adoc[leveloffset=+2] +include::modules/log-collector-rsyslog-server.adoc[leveloffset=+2] +// uncomment for 5.9 release [role="_additional-resources"] .Additional resources diff --git a/modules/log-collector-rsyslog-server.adoc b/modules/log-collector-rsyslog-server.adoc index 22c742e5b4ef..5cc9199195f0 100644 --- a/modules/log-collector-rsyslog-server.adoc +++ b/modules/log-collector-rsyslog-server.adoc @@ -19,12 +19,15 @@ In {logging} version 5.9 and newer versions, you can configure your log collecto . Modify the `ClusterLogForwarder` CR to add configuration for the `syslog` receiver input: + +-- +.Example `ClusterLogForwarder` CR if you are using a multi log forwarder deployment [source,yaml] ---- -apiVersion: logging.openshift.io/v1beta1 +apiVersion: logging.openshift.io/v1 kind: ClusterLogForwarder metadata: -# ... + name: example + namespace: spec: serviceAccountName: inputs: @@ -43,6 +46,35 @@ spec: <2> Specify the input receiver type as `syslog`. <3> Optional: Specify the port that the input receiver listens on. This must be a value between `1024` and `65535`. The default value is `10514` if this is not specified. <4> Configure a pipeline for your input receiver. +-- ++ +-- +.Example `ClusterLogForwarder` CR if you are using a legacy deployment +[source,yaml] +---- +apiVersion: logging.openshift.io/v1 +kind: ClusterLogForwarder +metadata: + name: instance + namespace: openshift-logging +spec: + inputs: + - name: syslog-receiver # <1> + receiver: + type: syslog # <2> + syslog: + port: 10514 # <3> + pipelines: # <4> + - inputRefs: + - syslog-receiver + name: syslog-pipeline +# ... +---- +<1> Specify a name for your input receiver. +<2> Specify the input receiver type as `syslog`. +<3> Optional: Specify the port that the input receiver listens on. This must be a value between `1024` and `65535`. The default value is `10514` if this is not specified. +<4> Configure a pipeline for your input receiver. +-- . Apply the changes to the `ClusterLogForwarder` CR by running the following command: +