mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 09:46:53 +01:00
73 lines
1.8 KiB
Plaintext
73 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * logging/cluster-logging-deploying.adoc
|
|
// * logging/cluster-logging-loki.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="configuring-log-storage-cr_{context}"]
|
|
= Configuring log storage
|
|
|
|
You can configure which log storage type your {logging} uses by modifying the `ClusterLogging` custom resource (CR).
|
|
|
|
.Prerequisites
|
|
|
|
* You have administrator permissions.
|
|
* You have installed the {oc-first}.
|
|
* You have installed the {clo} and an internal log store that is either the LokiStack or Elasticsearch.
|
|
* You have created a `ClusterLogging` CR.
|
|
|
|
include::snippets/logging-elastic-dep-snip.adoc[]
|
|
|
|
.Procedure
|
|
|
|
. Modify the `ClusterLogging` CR `logStore` spec:
|
|
+
|
|
.`ClusterLogging` CR example
|
|
[source,yaml]
|
|
----
|
|
apiVersion: logging.openshift.io/v1
|
|
kind: ClusterLogging
|
|
metadata:
|
|
# ...
|
|
spec:
|
|
# ...
|
|
logStore:
|
|
type: <log_store_type> <1>
|
|
elasticsearch: <2>
|
|
nodeCount: <integer>
|
|
resources: {}
|
|
storage: {}
|
|
redundancyPolicy: <redundancy_type> <3>
|
|
lokistack: <4>
|
|
name: {}
|
|
# ...
|
|
----
|
|
<1> Specify the log store type. This can be either `lokistack` or `elasticsearch`.
|
|
<2> Optional configuration options for the Elasticsearch log store.
|
|
<3> Specify the redundancy type. This value can be `ZeroRedundancy`, `SingleRedundancy`, `MultipleRedundancy`, or `FullRedundancy`.
|
|
<4> Optional configuration options for LokiStack.
|
|
+
|
|
.Example `ClusterLogging` CR to specify LokiStack as the log store
|
|
[source,yaml]
|
|
----
|
|
apiVersion: logging.openshift.io/v1
|
|
kind: ClusterLogging
|
|
metadata:
|
|
name: instance
|
|
namespace: openshift-logging
|
|
spec:
|
|
managementState: Managed
|
|
logStore:
|
|
type: lokistack
|
|
lokistack:
|
|
name: logging-loki
|
|
# ...
|
|
----
|
|
|
|
. Apply the `ClusterLogging` CR by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f <filename>.yaml
|
|
----
|