diff --git a/logging/log_collection_forwarding/cluster-logging-collector.adoc b/logging/log_collection_forwarding/cluster-logging-collector.adoc index 1b02bd1da94a..d6b4e21c48c1 100644 --- a/logging/log_collection_forwarding/cluster-logging-collector.adoc +++ b/logging/log_collection_forwarding/cluster-logging-collector.adoc @@ -20,7 +20,7 @@ include::modules/cluster-logging-collector-pod-location.adoc[leveloffset=+1] include::modules/cluster-logging-collector-limits.adoc[leveloffset=+1] -//include::modules/log-collector-rsyslog-server.adoc[leveloffset=+1] +include::modules/log-collector-rsyslog-server.adoc[leveloffset=+1] // uncomment for 5.9 release include::modules/log-collector-http-server.adoc[leveloffset=+1] diff --git a/modules/log-collector-rsyslog-server.adoc b/modules/log-collector-rsyslog-server.adoc index 22c742e5b4ef..5c875197fa51 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: @@ -36,13 +39,42 @@ spec: pipelines: # <4> - name: syslog-pipeline inputRefs: - - syslog-receiver + - infrastructure +# ... +---- +<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. +-- ++ +-- +.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: + - infrastructure + 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: + @@ -50,3 +82,9 @@ spec: ---- $ oc apply -f .yaml ---- + +The {clo} deploys a service for each configured input receiver so that clients can write to the collector. This service exposes the port specified for the input receiver. +The service name is generated based on the following: + +* For multi log forwarder `ClusterLogForwarder` CR deployments, the service name is in the format `-`. For the previous example YAML, the service name is `example-syslog-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 the previous example YAML, the service name is `collector-syslog-receiver`.