$ 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"]}}'
You can use the OKD web console to visualize log data by configuring the logging Console Plugin. Options for configuration are available during installation of logging on the web console.
If you have already installed logging and want to configure the plugin, use one of the following procedures.
You can enable the logging Console Plugin as part of the Red Hat OpenShift Logging Operator installation, but you can also enable the plugin if you have already installed the Red Hat OpenShift Logging Operator with the plugin disabled.
You have administrator permissions.
You have installed the Red Hat OpenShift Logging Operator and selected Disabled for the Console plugin.
You have access to the OKD web console.
In the OKD web console Administrator perspective, navigate to Operators → Installed Operators.
Click Red Hat OpenShift Logging. This takes you to the Operator Details page.
In the Details page, click Disabled for the Console plugin option.
In the Console plugin enablement dialog, select Enable.
Click Save.
Verify that the Console plugin option now shows Enabled.
The web console displays a pop-up window when changes have been applied. The window prompts you to reload the web console. Refresh the browser when you see the pop-up window to apply the changes.
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 logging Console Plugin by using the following procedure.
You have administrator permissions.
You have installed the Red Hat OpenShift Logging Operator, the OpenShift Elasticsearch Operator, and the Loki Operator.
You have installed the OpenShift CLI (oc
).
You have created a ClusterLogging
custom resource (CR).
Ensure that the logging Console Plugin is enabled by running the following command:
$ 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:
$ oc patch clusterlogging instance --type=merge --patch \
'{ "metadata": { "annotations": { "logging.openshift.io/ocp-console-migration-target": "lokistack-dev" }}}' \
-n openshift-logging
clusterlogging.logging.openshift.io/instance patched
Verify that the annotation was added successfully, by running the following command and observing the output:
$ oc get clusterlogging instance \
-o=jsonpath='{.metadata.annotations.logging\.openshift\.io/ocp-console-migration-target}' \
-n openshift-logging
"lokistack-dev"
The logging Console Plugin pod is now deployed. You can view logging data by navigating to the OKD web console and viewing the Observe → Logs page.