-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OBSDOCS-948: Follow up changes for http/syslog input docs #96822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
briandooley
merged 1 commit into
openshift:standalone-logging-docs-main
from
theashiot:OBSDOCS-948
Aug 28, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| :_mod-docs-content-type: ASSEMBLY | ||
| :context: cluster-logging-collector | ||
| [id="cluster-logging-collector"] | ||
| = Configuring the logging collector | ||
| include::_attributes/common-attributes.adoc[] | ||
|
|
||
| toc::[] | ||
|
|
||
| {logging-title-uc} collects operations and application logs from your cluster and enriches the data with Kubernetes pod and project metadata. | ||
| All supported modifications to the log collector can be performed though the `spec.collection` stanza in the `ClusterLogForwarder` custom resource (CR). | ||
|
|
||
| include::modules/creating-logfilesmetricexporter.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/cluster-logging-collector-limits.adoc[leveloffset=+1] | ||
|
|
||
| [id="cluster-logging-collector-input-receivers"] | ||
| == Configuring input receivers | ||
|
|
||
| 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. For log forwarder `ClusterLogForwarder` CR deployments, the service name is in the `<clusterlogforwarder_resource_name>-<input_name>` format. | ||
|
|
||
| include::modules/configuring-the-collector-to-receive-audit-logs-as-an-http-server.adoc[leveloffset=+2] | ||
| include::modules/configuring-the-collector-to-listen-for-connections-as-a-syslog-server.adoc[leveloffset=+2] | ||
|
|
||
| //include::modules/cluster-logging-collector-tuning.adoc[leveloffset=+1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 139 additions & 0 deletions
139
...les/configuring-the-collector-to-listen-for-connections-as-a-syslog-server.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * configuring/cluster-logging-collector.adoc | ||
|
|
||
|
|
||
| :_newdoc-version: 2.18.4 | ||
| :_template-generated: 2025-08-05 | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="configuring-the-collector-to-listen-for-connections-as-a-syslog-server_{context}"] | ||
| = Configuring the collector to listen for connections as a syslog server | ||
|
|
||
| You can configure your log collector to collect journal format infrastructure logs by specifying `syslog` as a receiver input in the `ClusterLogForwarder` custom resource (CR). | ||
|
|
||
| :feature-name: Syslog receiver input | ||
| include::snippets/logging-http-sys-input-support.adoc[] | ||
|
|
||
| Prerequisites | ||
|
|
||
| * You have administrator permissions. | ||
| * You have installed the {oc-first}. | ||
| * You have installed the {clo}. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Grant the `collect-infrastructure-logs` cluster role to the service account by running the following command: | ||
| + | ||
| .Example binding command | ||
| [source,terminal] | ||
| ---- | ||
| $ oc adm policy add-cluster-role-to-user collect-infrastructure-logs -z logcollector | ||
| ---- | ||
|
|
||
| . Modify the `ClusterLogForwarder` CR to add configuration for the `syslog` receiver input: | ||
| + | ||
| .Example `ClusterLogForwarder` CR | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: observability.openshift.io/v1 | ||
| kind: ClusterLogForwarder | ||
| metadata: | ||
| name: <clusterlogforwarder_name> #<1> | ||
| namespace: <namespace> | ||
| # ... | ||
| spec: | ||
| serviceAccount: | ||
| name: <service_account_name> # <1> | ||
| inputs: | ||
| - name: syslog-receiver # <2> | ||
| type: receiver | ||
| receiver: | ||
| type: syslog # <3> | ||
| port: 10514 # <4> | ||
| outputs: | ||
| - name: <output_name> | ||
| lokiStack: | ||
| authentication: | ||
| token: | ||
| from: serviceAccount | ||
| target: | ||
| name: logging-loki | ||
| namespace: openshift-logging | ||
| tls: # <5> | ||
| ca: | ||
| key: service-ca.crt | ||
| configMapName: openshift-service-ca.crt | ||
| type: lokiStack | ||
| # ... | ||
| pipelines: # <6> | ||
| - name: syslog-pipeline | ||
| inputRefs: | ||
| - syslog-receiver | ||
| outputRefs: | ||
| - <output_name> | ||
theashiot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # ... | ||
| ---- | ||
| <1> Use the service account that you granted the `collect-infrastructure-logs` permission in the previous step. | ||
| <2> Specify a name for your input receiver. | ||
| <3> Specify the input receiver type as `syslog`. | ||
| <4> Optional: Specify the port that the input receiver listens on. This must be a value between `1024` and `65535`. | ||
| <5> If TLS configuration is not set, the default certificates will be used. For more information, run the command `oc explain clusterlogforwarders.spec.inputs.receiver.tls`. | ||
| <6> 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 | ||
| ---- | ||
|
|
||
| . Verify that the collector is listening on the service that has a name in the `<clusterlogforwarder_resource_name>-<input_name>` format by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get svc | ||
| ---- | ||
| + | ||
| .Example output | ||
| + | ||
| [source,terminal,options="nowrap"] | ||
| ---- | ||
| NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
| collector ClusterIP 172.30.85.239 <none> 24231/TCP 33m | ||
| collector-syslog-receiver ClusterIP 172.30.216.142 <none> 10514/TCP 2m20s | ||
| ---- | ||
| + | ||
| In this example output, the service name is `collector-syslog-receiver`. | ||
|
|
||
| .Verification | ||
|
|
||
| . Extract the certificate authority (CA) certificate file by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc extract cm/openshift-service-ca.crt -n <namespace> | ||
| ---- | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| If the CA in the cluster where the collectors are running changes, you must extract the CA certificate file again. | ||
| ==== | ||
|
|
||
| . As an example, use the `curl` command to send logs by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ curl --cacert <openshift_service_ca.crt> collector-syslog-receiver.<namespace>.svc:10514 “test message” | ||
| ---- | ||
| + | ||
| Replace <openshift_service_ca.crt> with the extracted CA certificate file. | ||
|
|
||
| //// | ||
| . As an example, send logs by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ logger --tcp --server collector-syslog-receiver.<ns>.svc:10514 “test message” | ||
| ---- | ||
| //// | ||
111 changes: 111 additions & 0 deletions
111
modules/configuring-the-collector-to-receive-audit-logs-as-an-http-server.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * configuring/cluster-logging-collector.adoc | ||
|
|
||
| :_newdoc-version: 2.18.4 | ||
| :_template-generated: 2025-08-05 | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="configuring-the-collector-to-receive-audit-logs-as-an-http-server_{context}"] | ||
| = Configuring the collector to receive audit logs as an HTTP server | ||
|
|
||
| You can configure your log collector to listen for HTTP connections to only receive audit logs by specifying `http` as a receiver input in the `ClusterLogForwarder` custom resource (CR). | ||
|
|
||
| :feature-name: HTTP receiver input | ||
| include::snippets/logging-http-sys-input-support.adoc[] | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You have administrator permissions. | ||
| * You have installed the {oc-first}. | ||
| * You have installed the {clo}. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Modify the `ClusterLogForwarder` CR to add configuration for the `http` receiver input: | ||
| + | ||
| .Example `ClusterLogForwarder` CR | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: observability.openshift.io/v1 | ||
| kind: ClusterLogForwarder | ||
| metadata: | ||
| name: <clusterlogforwarder_name> #<1> | ||
| namespace: <namespace> | ||
| # ... | ||
| spec: | ||
| serviceAccount: | ||
| name: <service_account_name> | ||
| inputs: | ||
| - name: http-receiver #<2> | ||
| type: receiver | ||
| receiver: | ||
| type: http #<3> | ||
| port: 8443 #<4> | ||
| http: | ||
| format: kubeAPIAudit #<5> | ||
| outputs: | ||
| - name: <output_name> | ||
| type: http | ||
| http: | ||
| url: <url> | ||
| pipelines: #<6> | ||
| - name: http-pipeline | ||
| inputRefs: | ||
| - http-receiver | ||
| outputRefs: | ||
| - <output_name> | ||
| # ... | ||
| ---- | ||
| <1> Specify a name for the `ClusterLogForwarder` CR. | ||
| <2> Specify a name for your input receiver. | ||
| <3> Specify the input receiver type as `http`. | ||
| <4> Optional: Specify the port that the input receiver listens on. This must be a value between `1024` and `65535`. The default value is `8443` if this is not specified. | ||
| <5> Currently, only the `kube-apiserver` webhook format is supported for `http` input receivers. | ||
| <6> 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 | ||
| ---- | ||
|
|
||
| . Verify that the collector is listening on the service that has a name in the `<clusterlogforwarder_resource_name>-<input_name>` format by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get svc | ||
| ---- | ||
| + | ||
| .Example output | ||
| ---- | ||
| NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
| collector ClusterIP 172.30.85.239 <none> 24231/TCP 3m6s | ||
| collector-http-receiver ClusterIP 172.30.205.160 <none> 8443/TCP 3m6s | ||
| ---- | ||
| + | ||
| In the example, the service name is `collector-http-receiver`. | ||
|
|
||
| .Verification | ||
|
|
||
| . Extract the certificate authority (CA) certificate file by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc extract cm/openshift-service-ca.crt -n <namespace> | ||
theashiot marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ---- | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| If the CA in the cluster where the collectors are running changes, you must extract the CA certificate file again. | ||
| ==== | ||
|
|
||
| . As an example, use the `curl` command to send logs by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ curl --cacert <openshift_service_ca.crt> https://collector-http-receiver.<namespace>.svc:8443 -XPOST -d '{"<prefix>":"<message>"}' | ||
| ---- | ||
| + | ||
| Replace <openshift_service_ca.crt> with the extracted CA certificate file. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.