Skip to content

Commit 74c7ea0

Browse files
authored
Merge pull request #14034 from mburke5678/logging-fluentd-40
Update Fluentd for 4.0
2 parents 3dbaae5 + f347b51 commit 74c7ea0

7 files changed

+64
-45
lines changed

modules/efk-logging-fluentd-external.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ secret that is mounted on the Fluentd pods. The `your_ca_cert` and
7474
in `configmap/logging-fluentd`:
7575
+
7676
----
77-
$ oc patch secrets/logging-fluentd --type=json \
77+
$ oc patch secrets/fluentd --type=json \
7878
--patch "[{'op':'add','path':'/data/your_ca_cert','value':'$(base64 /path/to/your_ca_cert.pem)'}]"
79-
$ oc patch secrets/logging-fluentd --type=json \
79+
$ oc patch secrets/fluentd --type=json \
8080
--patch "[{'op':'add','path':'/data/your_private_key','value':'$(base64 /path/to/your_private_key.pem)'}]"
8181
----
8282
+

modules/efk-logging-fluentd-limits.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Each component specification allows for adjustments to both the CPU and memory l
99

1010
.Prerequisite
1111

12-
If needed, get the name of the Cluster Logging Custom Resource from the `openshift-logging` project:
12+
* Set cluster logging to the unmanaged state.
13+
14+
* If needed, get the name of the Cluster Logging Custom Resource from the `openshift-logging` project:
1315

1416
----
1517
$ oc get ClusterLogging
@@ -38,11 +40,11 @@ spec:
3840
elasticsearch:
3941
resources: <1>
4042
limits:
41-
cpu:
42-
memory:
43+
cpu: 500m
44+
memory: 4Gi
4345
requests:
44-
cpu:
45-
memory:
46+
cpu: 500m
47+
memory: 4Gi
4648
----
4749

48-
<1> Specify the CPU and memory limits as needed.
50+
<1> Specify the CPU and memory limits as needed. The values shown are the default values.

modules/efk-logging-fluentd-log-location.adoc

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,27 @@ Set cluster logging to the unmanaged state.
1616

1717
To set the output location for the Fluentd logs:
1818

19-
. Edit the `LOGGING_FILE_PATH` parameter. You can specify a particular file or `STDOUT`:
19+
. Edit the `LOGGING_FILE_PATH` parameter in the `fluentd` daemonset. You can specify a particular file or `console`:
2020
+
2121
----
22-
LOGGING_FILE_PATH=console <1>
23-
LOGGING_FILE_PATH=<path-to-log/fluentd.log> <2>
22+
spec:
23+
template:
24+
spec:
25+
containers:
26+
env:
27+
- name: LOGGING_FILE_PATH
28+
value: console <1>
29+
30+
LOGGING_FILE_PATH= <2>
2431
----
25-
<1> Sends the log output to the Fluentd default location. Retrieve the logs with the `oc logs [-f] <pod_name>` command.
26-
<2> Sends the log output to the specified file. Retrieve the logs with the `oc exec <pod_name> -- logs` command.
32+
<1> Specify the log output method:
33+
* use `consule` to use the Fluentd default location. Retrieve the logs with the `oc logs [-f] <pod_name>` command.
34+
* use `<path-to-log/fluentd.log> to sends the log output to the specified file. Retrieve the logs with the `oc exec <pod_name> -- logs` command.
35+
This is the default setting.
2736
+
28-
For example:
37+
Or, use the CLI:
2938
+
3039
----
31-
oc -n openshift-logging set env daemonset/fluentd --list | grep LOGGING_FILE_PATH
40+
oc -n openshift-logging set env daemonset/fluentd LOGGING_FILE_PATH=console
3241
----
3342

modules/efk-logging-fluentd-log-rotation.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ fluentd.log.3 1Mb
1919
fluentd.log.4 1Mb
2020
----
2121

22+
.Prerequisites
23+
24+
Set cluster logging to the unmanaged state.
25+
2226
.Procedure
2327

2428
You can control the size of the Fluentd log files and how many of the renamed files that {product-title} retains using
@@ -37,5 +41,5 @@ environment variables.
3741
For example:
3842

3943
----
40-
$ oc set env ds/logging-fluentd LOGGING_FILE_AGE=30 LOGGING_FILE_SIZE=1024000"
44+
$ oc set env daemonset/fluentd LOGGING_FILE_AGE=30 LOGGING_FILE_SIZE=1024000"
4145
----

modules/efk-logging-fluentd-log-viewing.adoc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,41 @@
77

88
How you view logs depends upon the `LOGGING_FILE_PATH` setting.
99

10-
* If you are using `LOGGING_FILE_PATH=console`, Fluentd writes logs to stdout/stderr`.
11-
You can retrieve the logs with the `oc logs [-f] <pod_name>` command, where the `-f`
12-
is optional, from the project where the pod is located.
10+
* If `LOGGING_FILE_PATH` points to a file, the default, use the *logs* utility, from the project,
11+
where the pod is located, to print out the contents of Fluentd log files:
1312
+
1413
----
15-
$ oc logs -f <pod> <1>
14+
$ oc exec <pod> -- logs <1>
1615
----
17-
<1> Specify the name of the Fluentd pod. Use `-f` option to follow what is being written into the logs.
16+
<1> Specify the name of the Fluentd pod. Note the space before `logs`.
1817
+
19-
For example
18+
For example:
2019
+
2120
----
22-
$ oc logs -f fluentd-lmvms
21+
$ oc exec etcd-member-ip-30.ec2.internal -n kube-system -- logs
2322
----
2423
+
25-
The contents of log files are printed out, starting with the oldest log.
26-
27-
* If `LOGGING_FILE_PATH` points to a file, use the *logs* utility, from the project,
28-
where the pod is located, to print out the contents of Fluentd log files:
24+
To view the current setting:
2925
+
3026
----
31-
$ oc exec <pod> -- logs <1>
27+
oc -n openshift-logging set env daemonset/fluentd --list | grep LOGGING_FILE_PATH
3228
----
33-
<1> Specify the name of the Fluentd pod. Note the space before `logs`.
34-
+
35-
For example:
29+
30+
* If you are using `LOGGING_FILE_PATH=console`, Fluentd writes logs to stdout/stderr`.
31+
You can retrieve the logs with the `oc logs [-f] <pod_name>` command, where the `-f`
32+
is optional, from the project where the pod is located.
3633
+
3734
----
38-
$ oc exec fluentd-lmvms -- logs
35+
$ oc logs -f <pod> <1>
3936
----
37+
<1> Specify the name of the Fluentd pod. Use `-f` option to follow what is being written into the logs.
4038
+
41-
To view the current setting:
39+
For example
4240
+
4341
----
44-
oc -n openshift-logging set env daemonset/fluentd --list | grep LOGGING_FILE_PATH
42+
$ oc logs -f etcd-member-ip-30.ec2.internal -n kube-system
4543
----
44+
+
45+
The contents of log files are printed out, starting with the oldest log.
46+
4647

modules/efk-logging-fluentd-pod-location.adoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ You can use the `oc get pods -o wide` command to see the nodes where the Fluentd
99

1010
.Procedure
1111

12-
Run the following command:
12+
Run the following command from th e`openshift-logging` project:
1313

1414
----
15-
$ oc get pods -o wide
15+
$ oc get pods -o wide | grep fluentd
1616
17-
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
18-
es-logging-data-master-5av030lk-1-2x494 2/2 Running 0 38m 154.128.0.80 ip-153-12-8-6.wef.internal <none>
19-
fluentd-logging-lqdxg 1/1 Running 0 2m 154.128.0.85 ip-153-12-8-6.wef.internal <none>
20-
kibana-logging-1-gj5kc 2/2 Running 0 39m 154.128.0.77 ip-153-12-8-6.wef.internal <none>
17+
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
18+
fluentd-5mr28 1/1 Running 0 4m56s 10.129.2.12 ip-10-0-164-233.ec2.internal <none>
19+
fluentd-cnc4c 1/1 Running 0 4m56s 10.128.2.13 ip-10-0-155-142.ec2.internal <none>
20+
fluentd-nlp8z 1/1 Running 0 4m56s 10.131.0.13 ip-10-0-138-77.ec2.internal <none>
21+
fluentd-rknlk 1/1 Running 0 4m56s 10.128.0.33 ip-10-0-128-130.ec2.internal <none>
22+
fluentd-rsm49 1/1 Running 0 4m56s 10.129.0.37 ip-10-0-163-191.ec2.internal <none>
23+
fluentd-wjt8s 1/1 Running 0 4m56s 10.130.0.42 ip-10-0-156-251.ec2.internal <none>
2124
----

modules/efk-logging-fluentd-throttling.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ node. The default is 1000 lines at a time per node. For example:
4040
* Projects
4141
+
4242
----
43-
project-name:
44-
read_lines_limit: 50
43+
throttle-config.yaml: |
4544
46-
second-project-name:
47-
read_lines_limit: 100
45+
opensift-logging: <1>
46+
read_lines_limit: 10
4847
----
4948

5049
* Logging
@@ -115,4 +114,5 @@ logging-infra-fluentd: "true".
115114
----
116115
$ oc patch ds logging-fluentd -p '{"spec":{"template":{"spec":{"nodeSelector":{"logging-infra-fluentd":"true"}}}}}'
117116
----
118-
////
117+
////
118+

0 commit comments

Comments
 (0)