|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing-logging.adoc |
| 4 | + |
| 5 | +:_newdoc-version: 2.18.4 |
| 6 | +:_template-generated: 2025-04-18 |
| 7 | +:_mod-docs-content-type: PROCEDURE |
| 8 | + |
| 9 | +[id="installing-the-logging-ui-plugin-cli_{context}"] |
| 10 | += Installing the logging UI plugin by using the CLI |
| 11 | + |
| 12 | +Install the logging UI plugin by using the command-line interface (CLI) so that you can visualize logs. |
| 13 | + |
| 14 | +.Prerequisites |
| 15 | +* You have administrator permissions. |
| 16 | +* You installed the {oc-first}. |
| 17 | +* You installed and configured {loki-op}. |
| 18 | + |
| 19 | +.Procedure |
| 20 | +. Install the {coo-full}. For more information, see link:https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/cluster_observability_operator/installing-cluster-observability-operators[Installing the Cluster Observability Operator]. |
| 21 | + |
| 22 | +. Create a `UIPlugin` custom resource (CR): |
| 23 | ++ |
| 24 | +.Example `UIPlugin` CR |
| 25 | +[source,yaml] |
| 26 | +---- |
| 27 | +apiVersion: observability.openshift.io/v1alpha1 |
| 28 | +kind: UIPlugin |
| 29 | +metadata: |
| 30 | + name: logging # <1> |
| 31 | +spec: |
| 32 | + type: Logging # <2> |
| 33 | + logging: |
| 34 | + lokiStack: |
| 35 | + name: logging-loki # <3> |
| 36 | + logsLimit: 50 |
| 37 | + timeout: 30s |
| 38 | + schema: otel # <4> |
| 39 | +---- |
| 40 | +<1> Set `name` to `logging`. |
| 41 | +<2> Set `type` to `Logging`. |
| 42 | +<3> The `name` value must match the name of your LokiStack instance. If you did not install LokiStack in the `openshift-logging` namespace, set the LokiStack namespace under the `lokiStack` configuration. |
| 43 | +<4> `schema` is one of `otel`, `viaq`, or `select`. The default is `viaq` if no value is specified. When you choose `select`, you can select the mode in the UI when you run a query. |
| 44 | ++ |
| 45 | +[NOTE] |
| 46 | +==== |
| 47 | +These are the known issues for the logging UI plugin - for more information, see link:https://issues.redhat.com/browse/OU-587[OU-587]. |
| 48 | +
|
| 49 | +* The `schema` feature is only supported in {product-title} 4.15 and later. In earlier versions of {product-title}, the logging UI plugin will only use the `viaq` attribute, ignoring any other values that might be set. |
| 50 | +* Non-administrator users cannot query logs using the `otel` attribute with {logging} {for} versions 5.8 to 6.2. This issue will be fixed in a future {logging} release. (https://issues.redhat.com/browse/LOG-6589[LOG-6589]) |
| 51 | +* In {logging} {for} version 5.9, the `severity_text` Otel attribute is not set. |
| 52 | +==== |
| 53 | + |
| 54 | +. Apply the `UIPlugin` CR object by running the following command: |
| 55 | ++ |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +$ oc apply -f <filename>.yaml |
| 59 | +---- |
| 60 | + |
| 61 | +.Verification |
| 62 | + |
| 63 | +. Access the {product-title} web console, and refresh the page if a pop-up message instructs you to do so. |
| 64 | +. Navigate to the *Observe → Logs* panel, where you can run LogQL queries. You can also query logs for individual pods from the *Aggregated Logs* tab of a specific pod. |
0 commit comments