1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/logging-loki-gui-install.adoc
2025-10-28 14:54:43 -04:00

173 lines
6.7 KiB
Plaintext

// Module is included in the following assemblies:
//
// * observability/logging/log_storage/installing-log-storage.adoc
:_mod-docs-content-type: PROCEDURE
[id="logging-loki-gui-install_{context}"]
= Installing {logging-uc} and the {loki-op} using the web console
To install and configure logging on your {product-title} cluster, an Operator such as {loki-op} for log storage must be installed first. This can be done from the software catalog within the web console.
.Prerequisites
* You have access to a supported object store (AWS S3, {gcp-full} Storage, Azure, Swift, Minio, {rh-storage}).
* You have administrator permissions.
* You have access to the {product-title} web console.
.Procedure
. In the {product-title} web console *Administrator* perspective, go to *Ecosystem* -> *Software Catalog*.
. Type {loki-op} in the *Filter by keyword* field. Click *{loki-op}* in the list of available Operators, and then click *Install*.
+
[IMPORTANT]
====
The Community {loki-op} is not supported by Red{nbsp}Hat.
====
. Select *stable* or *stable-x.y* as the *Update channel*.
+
--
include::snippets/logging-stable-updates-snip.adoc[]
--
+
The {loki-op} must be deployed to the global operator group namespace `openshift-operators-redhat`, so the *Installation mode* and *Installed Namespace* are already selected. If this namespace does not already exist, it is created for you.
. Select *Enable Operator-recommended cluster monitoring on this namespace.*
+
This option sets the `openshift.io/cluster-monitoring: "true"` label in the `Namespace` object. You must select this option to ensure that cluster monitoring scrapes the `openshift-operators-redhat` namespace.
. For *Update approval* select *Automatic*, then click *Install*.
+
If the approval strategy in the subscription is set to *Automatic*, the update process initiates as soon as a new Operator version is available in the selected channel. If the approval strategy is set to *Manual*, you must manually approve pending updates.
. Install the Red{nbsp}Hat OpenShift Logging Operator:
.. In the {product-title} web console, click *Ecosystem* -> *Software Catalog*.
.. Choose *Red{nbsp}Hat OpenShift Logging* from the list of available Operators, and click *Install*.
.. Ensure that the *A specific namespace on the cluster* is selected under *Installation Mode*.
.. Ensure that *Operator recommended namespace* is *openshift-logging* under *Installed Namespace*.
.. Select *Enable Operator recommended cluster monitoring on this namespace*.
+
This option sets the `openshift.io/cluster-monitoring: "true"` label in the Namespace object.
You must select this option to ensure that cluster monitoring
scrapes the `openshift-logging` namespace.
.. Select *stable-5.y* as the *Update Channel*.
.. Select an *Approval Strategy*.
+
* The *Automatic* strategy allows Operator Lifecycle Manager (OLM) to automatically update the Operator when a new version is available.
+
* The *Manual* strategy requires a user with appropriate credentials to approve the Operator update.
.. Click *Install*.
. Go to the *Ecosystem* -> *Installed Operators* page. Click the *All instances* tab.
. From the *Create new* drop-down list, select *LokiStack*.
. Select *YAML view*, and then use the following template to create a `LokiStack` CR:
+
--
.Example `LokiStack` CR
[source,yaml]
----
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki # <1>
namespace: openshift-logging # <2>
spec:
size: 1x.small # <3>
storage:
schemas:
- version: v13
effectiveDate: "<yyyy>-<mm>-<dd>"
secret:
name: logging-loki-s3 # <4>
type: s3 # <5>
credentialMode: # <6>
storageClassName: <storage_class_name> # <7>
tenants:
mode: openshift-logging # <8>
----
<1> Use the name `logging-loki`.
<2> You must specify the `openshift-logging` namespace.
<3> Specify the deployment size. In the {logging} 5.8 and later versions, the supported size options for production instances of Loki are `1x.extra-small`, `1x.small`, or `1x.medium`.
<4> Specify the name of your log store secret.
<5> Specify the corresponding storage type.
<6> Optional field, logging 5.9 and later. Supported user configured values are as follows: static is the default authentication mode available for all supported object storage types using credentials stored in a Secret. token for short-lived tokens retrieved from a credential source. In this mode the static configuration does not contain credentials needed for the object storage. Instead, they are generated during runtime using a service, which allows for shorter-lived credentials and much more granular control. This authentication mode is not supported for all object storage types. token-cco is the default value when Loki is running on managed STS mode and using CCO on STS/WIF clusters.
<7> Specify the name of a storage class for temporary storage. For best performance, specify a storage class that allocates block storage. Available storage classes for your cluster can be listed by using the `oc get storageclasses` command.
<8> LokiStack defaults to running in multi-tenant mode, which cannot be modified. One tenant is provided for each log type: audit, infrastructure, and application logs. This enables access control for individual users and user groups to different log streams.
--
+
[IMPORTANT]
====
It is not possible to change the number `1x` for the deployment size.
====
. Click *Create*.
. Create an OpenShift Logging instance:
.. Switch to the *Administration* -> *Custom Resource Definitions* page.
.. On the *Custom Resource Definitions* page, click *ClusterLogging*.
.. On the *Custom Resource Definition details* page, select *View Instances* from the *Actions* menu.
.. On the *ClusterLoggings* page, click *Create ClusterLogging*.
+
You might have to refresh the page to load the data.
.. In the YAML field, replace the code with the following:
+
--
[source,yaml]
----
apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
name: instance # <1>
namespace: openshift-logging # <2>
spec:
collection:
type: vector
logStore:
lokistack:
name: logging-loki
retentionPolicy:
application:
maxAge: 7d
audit:
maxAge: 7d
infra:
maxAge: 7d
type: lokistack
visualization:
type: ocp-console
ocpConsole:
logsLimit: 15
managementState: Managed
----
<1> Name must be `instance`.
<2> Namespace must be `openshift-logging`.
--
.Verification
. Go to *Ecosystem* -> *Installed Operators*.
. Make sure the *openshift-logging* project is selected.
. In the *Status* column, verify that you see green checkmarks with *InstallSucceeded* and the text *Up to date*.
[NOTE]
====
An Operator might display a `Failed` status before the installation finishes. If the Operator install completes with an `InstallSucceeded` message, refresh the page.
====