mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
62 lines
2.0 KiB
Plaintext
62 lines
2.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * observability/logging/log_visualization/log-visualization-ocp-console.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="logging-plugin-es-loki_{context}"]
|
|
= Configuring the {log-plug} when you have the Elasticsearch log store and LokiStack installed
|
|
|
|
In {logging} version 5.8 and later, if the Elasticsearch log store is your default log store but you have also installed the LokiStack, you can enable the {log-plug} by using the following procedure.
|
|
|
|
.Prerequisites
|
|
|
|
* You have administrator permissions.
|
|
* You have installed the {clo}, the {es-op}, and the {loki-op}.
|
|
* You have installed the {oc-first}.
|
|
* You have created a `ClusterLogging` custom resource (CR).
|
|
|
|
.Procedure
|
|
|
|
. Ensure that the {log-plug} is enabled by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get consoles.operator.openshift.io cluster -o yaml |grep logging-view-plugin \
|
|
|| oc patch consoles.operator.openshift.io cluster --type=merge \
|
|
--patch '{ "spec": { "plugins": ["logging-view-plugin"]}}'
|
|
----
|
|
|
|
. Add the `.metadata.annotations.logging.openshift.io/ocp-console-migration-target: lokistack-dev` annotation to the `ClusterLogging` CR, by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc patch clusterlogging instance --type=merge --patch \
|
|
'{ "metadata": { "annotations": { "logging.openshift.io/ocp-console-migration-target": "lokistack-dev" }}}' \
|
|
-n openshift-logging
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
clusterlogging.logging.openshift.io/instance patched
|
|
----
|
|
|
|
.Verification
|
|
|
|
* Verify that the annotation was added successfully, by running the following command and observing the output:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get clusterlogging instance \
|
|
-o=jsonpath='{.metadata.annotations.logging\.openshift\.io/ocp-console-migration-target}' \
|
|
-n openshift-logging
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
"lokistack-dev"
|
|
----
|
|
|
|
The {log-plug} pod is now deployed. You can view logging data by navigating to the {product-title} web console and viewing the *Observe* -> *Logs* page.
|