Skip to content

Commit

Permalink
OBSDOCS-890: Fix bugs in syslog docs
Browse files Browse the repository at this point in the history
  • Loading branch information
abrennan89 committed Mar 21, 2024
1 parent 6fd139c commit a29f9c9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
44 changes: 41 additions & 3 deletions modules/log-collector-rsyslog-server.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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: <namespace>
spec:
serviceAccountName: <service_account_name>
inputs:
Expand All @@ -36,17 +39,52 @@ 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:
+
[source,terminal]
----
$ oc apply -f <filename>.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 `<ClusterLogForwarder_CR_name>-<input_name>`. 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-<input_name>`. For the previous example YAML, the service name is `collector-syslog-receiver`.

0 comments on commit a29f9c9

Please sign in to comment.