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