Skip to main contentIBM Cloud Pak Playbook

Enabling Monitoring

This section describes how to enable the monitoring component, after you have completed installing the core components of Cloud Pak for Multicloud Management 2.0. The Cloud platform used to test and document the installation here is OpenShift on IBM Cloud (ROKS), specifically an OpenShift 4.4 cluster. However, since OpenShift 4.3. and 4.4 are available on a variety of platforms, the instructions should be valid on whatever on-premise or cloud platform where you are running OpenShift supported versions.

The enablement of monitoring is well documented in the IBM Knowledge Center. The installation process documented there uses a mix of the Openshift UI and the command line.

As an alternative, this section of the Cloud Pak Playbook describes an installation exclusively using the command line. With this approach, it is possible to automate the installation by incorporating these commands into shell scripts.

    Set up necessary Environment variables

    If you have just completed the installation of the Cloud Pak for Multicloud Management core components, you probably already have these environment variables set in your command line environment. In any case, you should check to make sure they are defined as described below. The final step in this section defines 2 additional environment variables whose values can only be known after the installation of the core components. Be sure to at least define these variables, if you already have the others defined.

    1. Log in to MyIBM Container Software Library with your IBMid and password. In the Entitlement keys section, copy the entitlement key to your buffer.

    2. In your command line, paste this entitlement key into an environment variable.

    export ENTITLED_REGISTRY_KEY="<Paste Your Entitlement Key>"
    1. Define the other environment variables you will need for the core MCM component installation.
    export ENTITLED_REGISTRY_SECRET="ibm-management-pull-secret"
    export DOCKER_EMAIL="<Your Docker ID email>"
    export CP4MCM_NAMESPACE="cp4m"
    export CP4MCM_BLOCK_STORAGECLASS="ibmc-block-gold"
    export CP4MCM_FILE_STORAGECLASS="ibmc-file-gold"
    export CP4MCM_FILE_GID_STORAGECLASS="ibmc-file-gold-gid"

    The value of ENTITLED_REGISTRY points to IBM’s registry containing the software images. The values of the ENTITLED_REGISTRY_SECRET and CP4MCM_NAMESPACE are arbitrary. You can use different values if you want. The ...STORAGECLASS variables are populated based on the storage classes available in the OpenShift cluster. The storage classes you have available will vary based on the platform on which you are running your MCM OpenShift cluster. To find the available storage classes in your cluster, enter the command oc get sc.

    1. Go to your OpenShift Cluster UI, and log in to your cluster. From the pull-down menu in the top right corner, click Copy Login Command, then click Display Token. Copy the command line under Log in with this token, paste it into your command line and Enter to log in to your cluster. The command line is in the form:
    oc login --token=<your_token> --server=<SERVER_URL>
    1. Define the 2 additional post-install environment variables.
    export YOUR_CP4MCM_ROUTE=`oc -n ibm-common-services get route cp-console --template '{{}}'`
    export CP_PASSWORD=`oc -n ibm-common-services get secret platform-auth-idp-credentials -o jsonpath='{.data.admin_password}' | base64 -d`

    Adding the Monitoring Storage Configuration

    1. Enter the following command:
    oc patch ibm-management -n $CP4MCM_NAMESPACE --type=json -p="[
    {"op": "test",
    "path": "/spec/pakModules/1/name",
    "value": "monitoring" },
    {"op": "replace",
    "path": "/spec/pakModules/1/config/0/spec",
    "monitoringDeploy": {

    Enabling the Monitoring Component

    1. Enter the following command.
    oc patch ibm-management -n $CP4MCM_NAMESPACE --type=json -p='[
    {"op": "test",
    "path": "/spec/pakModules/1/name",
    "value": "monitoring" },
    {"op": "replace",
    "path": "/spec/pakModules/1/enabled",
    "value": true }
    1. The enablement of the monitoring component will start a number of additional pods. The installation will be finished when all those additional pods have started successfully. This command will report these pods that are not yet in the Running or Completed states yet.
    oc get po --no-headers=true -A | grep -v 'Running\|Completed\|gateway-kong' | grep 'kube-system\|ibm-common-services\|management-infrastructure-management\|management-monitoring\|management-operations\|management-security-services'

    Do not move on to the next command until all the addtional pods have completed. Keep repeating the command above until the list comes back empty.

    Patching the Monitoring Deployable Secret

    1. Enter the following commands.
    export ENTITLED_REGISTRY_DOCKERCONFIG=`oc get secret $ENTITLED_REGISTRY_SECRET -n $CP4MCM_NAMESPACE -o jsonpath='{.data.\.dockerconfigjson}'`
    execlog oc patch -p `echo {\"spec\":{\"template\":{\"data\":{\".dockerconfigjson\":\"$ENTITLED_REGISTRY_DOCKERCONFIG\"}}}}` --type merge -n management-monitoring

    Additional Resources