Chapter 6. Enable the Logs tab in the web console
After installing the Cluster Observability Operator, create a UIPlugin custom resource to enable the Logs tab in the OpenShift Container Platform web console under Observe
6.1. Enable the Logs tab in the web console Copy linkLink copied to clipboard!
To view logs in the OpenShift Container Platform web console under Observe UIPlugin CR.
The Cluster Observability Operator is required for console-based log visualization. Without it, you can only query logs by using the CLI or the Loki API directly.
Prerequisites
- You installed the Loki Operator and the Red Hat OpenShift Logging Operator.
Procedure
Install the Cluster Observability Operator.
The COO installs into the
openshift-operatorsnamespace, which already has a pre-existingOperatorGroup. No additional namespace orOperatorGroupconfiguration is required.Create a
UIPluginCR:apiVersion: observability.openshift.io/v1alpha1 kind: UIPlugin metadata: name: logging spec: type: Logging logging: lokiStack: name: logging-loki logsLimit: 50 timeout: 30s schema: otelmetadata.name-
Set the name to
logging. spec.type-
Set the type to
Logging. spec.logging.lokiStack.name-
Must match the name of your
LokiStackinstance. spec.logging.schemaSet to
otel,viaq, orselect. The default isviaqif no value is specified. When you selectselect, you can select the mode in the UI when you run a query.NoteThe following are known issues for the logging UI plugin (OU-587):
-
The
schemafeature is only supported in OpenShift Container Platform 4.15 and later. In earlier versions, the logging UI plugin uses only theviaqattribute, ignoring any other values that might be set. -
Non-administrator users cannot query logs by using the
otelattribute with logging versions 5.8 to 6.2. (LOG-6589)
-
The
Apply the
UIPluginCR by running the following command:$ oc apply -f <filename>.yaml-
Refresh the OpenShift Container Platform web console. Navigate to Observe
Logs to verify that the Logs tab is available. You can also view aggregated logs for individual pods from the Aggregated Logs tab on a pod’s detail page.