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-creating-service-monitor.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

76 lines
2.5 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-creating-service-monitor_{context}"]
= Creating OADP service monitor
[role="_abstract"]
{oadp-short} provides an `openshift-adp-velero-metrics-svc` service, which is created when the Data Protection Application (DPA) is configured. The user workload monitoring service monitor must point to the defined service.
To get details about the service, complete the following steps.
.Procedure
. Ensure that the `openshift-adp-velero-metrics-svc` service exists. It should contain `app.kubernetes.io/name=velero` label, which is used as selector for the `ServiceMonitor` object.
+
[source,terminal]
----
$ oc get svc -n openshift-adp -l app.kubernetes.io/name=velero
----
+
.Example output
[source,terminal]
----
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
openshift-adp-velero-metrics-svc ClusterIP 172.30.38.244 <none> 8085/TCP 1h
----
. Create a `ServiceMonitor` YAML file that matches the existing service label, and save the file as `3_create_oadp_service_monitor.yaml`. The service monitor is created in the `openshift-adp` namespace where the `openshift-adp-velero-metrics-svc` service resides.
+
.Example `ServiceMonitor` object
[source,yaml]
+
----
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: oadp-service-monitor
name: oadp-service-monitor
namespace: openshift-adp
spec:
endpoints:
- interval: 30s
path: /metrics
targetPort: 8085
scheme: http
selector:
matchLabels:
app.kubernetes.io/name: "velero"
----
. Apply the `3_create_oadp_service_monitor.yaml` file:
+
[source,terminal]
----
$ oc apply -f 3_create_oadp_service_monitor.yaml
----
+
.Example output
[source,terminal]
----
servicemonitor.monitoring.coreos.com/oadp-service-monitor created
----
.Verification
* Confirm that the new service monitor is in an *Up* state by using the *Administrator* perspective of the {product-title} web console. Wait a few minutes for the service monitor to reach the *Up* state.
.. Navigate to the *Observe* -> *Targets* page.
.. Ensure the *Filter* is unselected or that the *User* source is selected and type `openshift-adp` in the `Text` search field.
.. Verify that the status for the *Status* for the service monitor is *Up*.
+
.OADP metrics targets
image::oadp-metrics-targets.png[OADP metrics targets]