mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
// * logging/log_collection_forwarding/log-forwarding
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="logging-http-forward_{context}"]
|
|
= Forwarding logs over HTTP
|
|
|
|
Forwarding logs over HTTP is supported for both the Fluentd and Vector log collectors. To enable, specify `http` as the output type in the `ClusterLogForwarder` custom resource (CR).
|
|
|
|
.Procedure
|
|
|
|
* Create or edit the `ClusterLogForwarder` CR using the template below:
|
|
+
|
|
.Example ClusterLogForwarder CR
|
|
[source,yaml]
|
|
----
|
|
apiVersion: logging.openshift.io/v1
|
|
kind: ClusterLogForwarder
|
|
metadata:
|
|
name: <log_forwarder_name> <1>
|
|
namespace: <log_forwarder_namespace> <2>
|
|
spec:
|
|
serviceAccountName: <service_account_name> <3>
|
|
outputs:
|
|
- name: httpout-app
|
|
type: http
|
|
url: <4>
|
|
http:
|
|
headers: <5>
|
|
h1: v1
|
|
h2: v2
|
|
method: POST
|
|
secret:
|
|
name: <6>
|
|
tls:
|
|
insecureSkipVerify: <7>
|
|
pipelines:
|
|
- name:
|
|
inputRefs:
|
|
- application
|
|
outputRefs:
|
|
- <8>
|
|
----
|
|
<1> In legacy implementations, the CR name must be `instance`. In multi log forwarder implementations, you can use any name.
|
|
<2> In legacy implementations, the CR namespace must be `openshift-logging`. In multi log forwarder implementations, you can use any namespace.
|
|
<3> The name of your service account. The service account is only required in multi log forwarder implementations if the log forwarder is not deployed in the `openshift-logging` namespace.
|
|
<4> Destination address for logs.
|
|
<5> Additional headers to send with the log record.
|
|
<6> Secret name for destination credentials.
|
|
<7> Values are either `true` or `false`.
|
|
<8> This value should be the same as the output name.
|