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

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