// Module included in the following assemblies:
//
// * security/cert_manager_operator/cert-manager-monitoring.adoc

:_mod-docs-content-type: PROCEDURE
[id="cert-manager-enable-user-workload-monitor_{context}"]
= Enabling user workload monitoring

[role="_abstract"]
To collect metrics from your specific applications, enable monitoring for user-defined projects. You can enable monitoring for user-defined projects by configuring user workload monitoring in the cluster. For more information, see "Setting up metrics collection for user-defined projects".

.Prerequisites

* You have access to the cluster as a user with the `cluster-admin` role.

.Procedure

. Create the `cluster-monitoring-config.yaml` YAML file:
+
[source,yaml]
----
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    enableUserWorkload: true
----

. Apply the `ConfigMap` by running the following command:
+
[source,terminal]
----
$ oc apply -f cluster-monitoring-config.yaml
----

.Verification

. Verify that the monitoring components for user workloads are running in the `openshift-user-workload-monitoring` namespace by running the following command:
+
[source,terminal]
----
$ oc -n openshift-user-workload-monitoring get pod
----
+
.Example output
[source,terminal]
----
NAME                                   READY   STATUS    RESTARTS   AGE
prometheus-operator-6cb6bd9588-dtzxq   2/2     Running   0          50s
prometheus-user-workload-0             6/6     Running   0          48s
prometheus-user-workload-1             6/6     Running   0          48s
thanos-ruler-user-workload-0           4/4     Running   0          42s
thanos-ruler-user-workload-1           4/4     Running   0          42s
----
+
The status of the pods such as `prometheus-operator`, `prometheus-user-workload`, and `thanos-ruler-user-workload` must be `Running`.
