Skip to content

Commit 23c53b9

Browse files
authored
Merge pull request #70343 from abrennan89/OBSDOCS-476
OBSDOCS-476: Fix minor formatting bug and additional improvements
2 parents 230caa3 + 10353c5 commit 23c53b9

File tree

1 file changed

+30
-25
lines changed

1 file changed

+30
-25
lines changed

modules/cluster-logging-collector-log-forward-loki.adoc

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/log_collection_forwarding/log-forwarding.adoc
4+
15
:_mod-docs-content-type: PROCEDURE
26
[id="cluster-logging-collector-log-forward-loki_{context}"]
3-
= Forwarding logs to Loki
7+
= Forwarding logs to an external Loki logging system
48

5-
You can forward logs to an external Loki logging system in addition to, or instead of, the internal default {product-title} Elasticsearch instance.
9+
You can forward logs to an external Loki logging system in addition to, or instead of, the default log store.
610

711
To configure log forwarding to Loki, you must create a `ClusterLogForwarder` custom resource (CR) with an output to Loki, and a pipeline that uses the output. The output to Loki can use the HTTP (insecure) or HTTPS (secure HTTP) connection.
812

@@ -24,27 +28,29 @@ metadata:
2428
spec:
2529
serviceAccountName: <service_account_name> <3>
2630
outputs:
27-
- name: loki-insecure <4>
28-
type: "loki" <5>
29-
url: http://loki.insecure.com:3100 <6>
30-
loki:
31-
tenantKey: kubernetes.namespace_name
32-
labelKeys: kubernetes.labels.foo
33-
- name: loki-secure <7>
34-
type: "loki"
35-
url: https://loki.secure.com:3100
36-
secret:
37-
name: loki-secret <8>
38-
loki:
39-
tenantKey: kubernetes.namespace_name <9>
40-
labelKeys: kubernetes.labels.foo <10>
31+
- name: loki-insecure <4>
32+
type: "loki" <5>
33+
url: http://loki.insecure.com:3100 <6>
34+
loki:
35+
tenantKey: kubernetes.namespace_name
36+
labelKeys:
37+
- kubernetes.labels.foo
38+
- name: loki-secure <7>
39+
type: "loki"
40+
url: https://loki.secure.com:3100
41+
secret:
42+
name: loki-secret <8>
43+
loki:
44+
tenantKey: kubernetes.namespace_name <9>
45+
labelKeys:
46+
- kubernetes.labels.foo <10>
4147
pipelines:
42-
- name: application-logs <11>
43-
inputRefs: <12>
44-
- application
45-
- audit
46-
outputRefs: <13>
47-
- loki-secure
48+
- name: application-logs <11>
49+
inputRefs: <12>
50+
- application
51+
- audit
52+
outputRefs: <13>
53+
- loki-secure
4854
----
4955
<1> In legacy implementations, the CR name must be `instance`. In multi log forwarder implementations, you can use any name.
5056
<2> In legacy implementations, the CR namespace must be `openshift-logging`. In multi log forwarder implementations, you can use any namespace.
@@ -65,10 +71,9 @@ spec:
6571
Because Loki requires log streams to be correctly ordered by timestamp, `labelKeys` always includes the `kubernetes_host` label set, even if you do not specify it. This inclusion ensures that each stream originates from a single host, which prevents timestamps from becoming disordered due to clock differences on different hosts.
6672
====
6773

68-
69-
. Create the CR object:
74+
. Apply the `ClusterLogForwarder` CR object by running the following command:
7075
+
7176
[source,terminal]
7277
----
73-
$ oc create -f <file-name>.yaml
78+
$ oc apply -f <filename>.yaml
7479
----

0 commit comments

Comments
 (0)