1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/oadp-monitoring-setup.adoc
Shruti Deshpande eeb15a1127 DITA fixes for OADP troubleshooting
Signed-off-by: Shruti Deshpande <shdeshpa@redhat.com>
2025-09-04 10:04:30 +00:00

103 lines
3.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/troubleshooting/oadp-monitoring.adoc
:_mod-docs-content-type: PROCEDURE
[id="oadp-monitoring-setup-monitor_{context}"]
= OADP monitoring setup
[role="_abstract"]
The OADP Operator leverages an OpenShift User Workload Monitoring provided by the OpenShift Monitoring Stack for retrieving metrics from the Velero service endpoint. The monitoring stack allows creating user-defined Alerting Rules or querying metrics by using the OpenShift Metrics query front end.
With enabled User Workload Monitoring, it is possible to configure and use any Prometheus-compatible third-party UI, such as Grafana, to visualize Velero metrics.
Monitoring metrics requires enabling monitoring for the user-defined projects and creating a `ServiceMonitor` resource to scrape those metrics from the already enabled OADP service endpoint that resides in the `openshift-adp` namespace.
[NOTE]
====
The {oadp-short} support for Prometheus metrics is offered on a best-effort basis and is not fully supported.
====
For more information about setting up the monitoring stack, see {ocp-user-workload-monitoring}.
.Prerequisites
* You have access to an {product-title} cluster using an account with `cluster-admin` permissions.
* You have created a cluster monitoring config map.
.Procedure
. Edit the `cluster-monitoring-config` `ConfigMap` object in the `openshift-monitoring` namespace by using the following command:
+
[source,terminal]
----
$ oc edit configmap cluster-monitoring-config -n openshift-monitoring
----
. Add or enable the `enableUserWorkload` option in the `data` section's `config.yaml` field by using the following command:
+
[source,yaml]
----
apiVersion: v1
kind: ConfigMap
data:
config.yaml: |
enableUserWorkload: true <1>
metadata:
# ...
----
<1> Add this option or set to `true`
. Wait a short period to verify the User Workload Monitoring Setup by checking that the following components are up and running in the `openshift-user-workload-monitoring` namespace:
+
[source,terminal]
----
$ oc get pods -n openshift-user-workload-monitoring
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
prometheus-operator-6844b4b99c-b57j9 2/2 Running 0 43s
prometheus-user-workload-0 5/5 Running 0 32s
prometheus-user-workload-1 5/5 Running 0 32s
thanos-ruler-user-workload-0 3/3 Running 0 32s
thanos-ruler-user-workload-1 3/3 Running 0 32s
----
+
. Verify the existence of the `user-workload-monitoring-config` ConfigMap in the `openshift-user-workload-monitoring`. If it exists, skip the remaining steps in this procedure.
+
[source,terminal]
----
$ oc get configmap user-workload-monitoring-config -n openshift-user-workload-monitoring
----
+
.Example output
[source,terminal]
----
Error from server (NotFound): configmaps "user-workload-monitoring-config" not found
----
+
. Create a `user-workload-monitoring-config` `ConfigMap` object for the User Workload Monitoring, and save it under the `2_configure_user_workload_monitoring.yaml` file name:
+
.Example output
[source,yaml]
+
----
apiVersion: v1
kind: ConfigMap
metadata:
name: user-workload-monitoring-config
namespace: openshift-user-workload-monitoring
data:
config.yaml: |
----
+
. Apply the `2_configure_user_workload_monitoring.yaml` file by using the following command:
+
[source,terminal]
----
$ oc apply -f 2_configure_user_workload_monitoring.yaml
configmap/user-workload-monitoring-config created
----