Skip to content

Commit ec3793f

Browse files
authored
Merge pull request #31141 from rolfedh/RHDEVDOCS-2829
RHDEVDOCS-2829 Explain how to "only deploy collector section"
2 parents 6381f9b + 4bfeef4 commit ec3793f

6 files changed

+69
-3
lines changed

_topic_map.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ Topics:
16811681
Dir: config
16821682
Distros: openshift-enterprise,openshift-origin
16831683
Topics:
1684-
- Name: About the Logging custom resource
1684+
- Name: About the Cluster Logging custom resource
16851685
File: cluster-logging-configuring-cr
16861686
- Name: Configuring the logging collector
16871687
File: cluster-logging-collector
File renamed without changes.
File renamed without changes.

logging/config/cluster-logging-collector.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ include::modules/cluster-logging-collector-limits.adoc[leveloffset=+1]
2222

2323
include::modules/cluster-logging-collector-tuning.adoc[leveloffset=+1]
2424

25+
include::modules/cluster-logging-removing-unused-components-if-no-elasticsearch.adoc[leveloffset=+1]
26+
27+
.Additional resources
28+
29+
* xref:../../logging/cluster-logging-external.adoc#cluster-logging-external[Forwarding logs to third party systems]

modules/cluster-logging-about-crd.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
= About the `ClusterLogging` custom resource
77

88
To make changes to your OpenShift Logging environment, create and modify the `ClusterLogging` custom resource (CR).
9+
910
Instructions for creating or modifying a CR are provided in this documentation as appropriate.
1011

11-
The following is an example of a typical custom resource for OpenShift Logging.
12+
The following example shows a typical custom resource for OpenShift Logging.
1213

1314
[id="efk-logging-configuring-about-sample_{context}"]
14-
.Sample `ClusterLogging` CR
15+
.Sample `ClusterLogging` custom resource (CR)
1516
ifdef::openshift-dedicated[]
1617
[source,yaml]
1718
----
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/cluster-logging-collector.adoc
4+
5+
[id="cluster-logging-removing-unused-components-if-no-elasticsearch_{context}"]
6+
= Removing unused components if you do not use the default Elasticsearch log store
7+
8+
As an administrator, in the rare case that you forward logs to a third-party log store and do not use the default Elasticsearch log store, you can remove several unused components from your logging cluster.
9+
10+
In other words, if you do not use the default Elasticsearch log store, you can remove the internal Elasticsearch `logStore`, Kibana `visualization`, and log `curation` components from the `ClusterLogging` custom resource (CR). Removing these components is optional but saves resources.
11+
12+
.Prerequisites
13+
14+
* Verify that your log forwarder does not send log data to the default internal Elasticsearch cluster. Inspect the `ClusterLogForwarder` CR YAML file that you used to configure log forwarding. Verify that it _does not_ have an `outputRefs` element that specifies `default`. For example:
15+
+
16+
[source,yaml]
17+
----
18+
outputRefs:
19+
- default
20+
----
21+
22+
[WARNING]
23+
====
24+
Suppose the `ClusterLogForwarder` CR forwards log data to the internal Elasticsearch cluster, and you remove the `logStore` component from the `ClusterLogging` CR. In that case, the internal Elasticsearch cluster will not be present to store the log data. This absence can cause data loss.
25+
====
26+
27+
.Procedure
28+
29+
. Edit the `ClusterLogging` custom resource (CR) in the `openshift-logging` project:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc edit ClusterLogging instance
34+
----
35+
36+
. If they are present, remove the `logStore`, `visualization`, `curation` stanzas from the `ClusterLogging` CR.
37+
38+
. Preserve the `collection` stanza of the `ClusterLogging` CR. The result should look similar to the following example:
39+
+
40+
[source,yaml]
41+
----
42+
apiVersion: "logging.openshift.io/v1"
43+
kind: "ClusterLogging"
44+
metadata:
45+
name: "instance"
46+
namespace: "openshift-logging"
47+
spec:
48+
managementState: "Managed"
49+
collection:
50+
logs:
51+
type: "fluentd"
52+
fluentd: {}
53+
----
54+
55+
. Verify that the Fluentd pods are redeployed:
56+
+
57+
[source,terminal]
58+
----
59+
$ oc get pods -n openshift-logging
60+
----

0 commit comments

Comments
 (0)