1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/rosa-install-logging-addon.adoc
2022-03-04 11:09:36 -05:00

108 lines
4.2 KiB
Plaintext

// Module included in the following assemblies:
//
// logging/rosa-install-logging.adoc
:_content-type: PROCEDURE
[id="rosa-install-logging-addon_{context}"]
= Install the logging add-on service
{product-title} (ROSA) provides logging through the `cluster-logging-operator` add-on. This add-on service offers an optional application log forwarding solution based on AWS CloudWatch. This logging solution can be installed after the ROSA cluster is provisioned.
.Procedure
. Enter the following command:
+
[source,terminal]
----
$ rosa install addon cluster-logging-operator --cluster=<cluster_name> --interactive
----
+
For `<cluster_name>`, enter the name of your cluster.
. When prompted, accept the default `yes` to install the `cluster-logging-operator`.
. When prompted, accept the default `yes` to install the optional Amazon CloudWatch log forwarding add-on or enter `no` to decline the installation of this add-on.
+
[NOTE]
====
It is not necessary to install the AWS CloudWatch service when you install the `cluster-logging-operator`. You can install the AWS CloudWatch service at any time through {cluster-manager} console from the cluster's *Add-ons* tab.
====
. For the collection of applications, infrastructure, and audit logs, accept the default values or change them as needed:
+
* *Applications logs*: Lets the Operator collect application logs, which includes everything that is _not_ deployed in the openshift-*, kube-*, and default namespaces. Default: `yes`
* *Infrastructure logs*: Lets the Operator collect logs from OpenShift Container Platform, Kubernetes, and some nodes. Default: `yes`
* *Audit logs*: Type `yes` to let the Operator collect node logs related to security audits. By default, Red Hat stores audit logs outside the cluster through a separate mechanism that does not rely on the Cluster Logging Operator. For more information about default audit logging, see the ROSA Service Definition. Default: `no`
. For the Amazon CloudWatch region, use the default cluster region, leave the `Cloudwatch region` value empty.
+
.Example output
[source,terminal]
----
? Are you sure you want to install add-on 'cluster-logging-operator' on cluster '<cluster_name>'? Yes
? Use AWS CloudWatch (optional): Yes
? Collect Applications logs (optional): Yes
? Collect Infrastructure logs (optional): Yes
? Collect Audit logs (optional): No
? CloudWatch region (optional):
I: Add-on 'cluster-logging-operator' is now installing. To check the status run 'rosa list addons --cluster=<cluster_name>'
----
[NOTE]
====
The installation can take approximately 10 minutes to complete.
====
.Verification steps
. To verify the logging installation status, enter the following command:
+
[source,terminal]
----
$ rosa list addons --cluster=<cluster_name>
----
. To verify which pods are deployed by `cluster-logging-operator` and their state of readiness:
.. Log in to the `oc` CLI using `cluster-admin` credentials:
+
[source,terminal]
----
$ oc login https://api.mycluster.abwp.s1.example.org:6443 \
--username cluster-admin
--password <password>
----
.. Enter the following command to get information about the pods for the default project. Alternatively, you can specify a different project.
+
[source,terminal]
----
$ oc get pods -n openshift-logging
----
+
.Example output
+
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
cluster-logging-operator-<pod_ID > 2/2 Running 0 7m1s
fluentd-4mnwp 1/1 Running 0 6m3s
fluentd-6xt25 1/1 Running 0 6m3s
fluentd-fqjhv 1/1 Running 0 6m3s
fluentd-gcvrg 1/1 Running 0 6m3s
fluentd-vpwrt 1/1 Running 0 6m3s
----
. Optional: To get information about the `clusterlogging` instance, enter the following command:
+
[source,terminal]
----
$ oc get clusterlogging -n openshift-logging
----
. Optional: To get information about `clusterlogforwarders` instances, enter the following command:
+
[source,terminal]
----
$ oc get clusterlogforwarders -n openshift-logging
----