Creating a user-defined workload monitoring configmap
You can configure the user workload monitoring components with the user-workload-monitoring-config configmap object in the openshift-user-workload-monitoring project. The Cluster Monitoring Operator (CMO) then configures
the components that monitor user-defined projects.
Prerequisites
- You must have access to the cluster as a user with the
cluster-adminrole. - OpenShift command-line interface is required. For more information, see Getting started with the OpenShift CLI.
Procedure
-
Check if the
user-workload-monitoring-configconfigmap object exists:oc -n openshift-user-workload-monitoring get configmap user-workload-monitoring-config -
If the
user-workload-monitoring-configconfigmap object does not exist:Create the following YAML manifest. In this example, the file is called
user-workload-monitoring-config.yaml:apiVersion: v1 kind: ConfigMap metadata: name: user-workload-monitoring-config namespace: openshift-user-workload-monitoring data: config.yaml: |-
Apply the configuration to create the configmap object:
oc apply -f user-workload-monitoring-config.yaml
-