1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/logging-http-forward.adoc
Prithviraj Patil 4a7f62efe5 outputRefs value is missing in Forwarding logs over HTTP documentation
- `outputRefs` value is missing in Forwarding logs over HTTP documentation.
- Here is the documentation link: https://docs.openshift.com/container-platform/4.16/observability/logging/log_collection_forwarding/configuring-log-forwarding.html#logging-http-forward_configuring-log-forwarding
- This `outputRefs` value should be the same as the output name.
- It is missing here.
- Here is the current configuration:
~~~
apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
  name: <log_forwarder_name>
  namespace: <log_forwarder_namespace>
spec:
  serviceAccountName: <service_account_name>
  outputs:
    - name: httpout-app
      type: http
      url:
      http:
        headers:
          h1: v1
          h2: v2
        method: POST
      secret:
        name:
      tls:
        insecureSkipVerify:
  pipelines:
    - name:
      inputRefs:
        - application
      outputRefs:
        -
~~~
- Hence we need to add the `outputRefs` value here.
- Here is the correct configuration:
~~~

~~~
2025-01-06 06:27:52 +00:00

53 lines
1.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * observability/logging/log_collection_forwarding/configuring-log-forwarding.adoc
:_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:
- httpout-app <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.