Configuring monitoring to use Fusion Data Foundation

Fusion Data Foundation provides a monitoring stack that comprises of Prometheus and Alert Manager.

About this task

Important: Monitoring will not function if it runs out of storage space. Always ensure that you have plenty of storage capacity for monitoring.

IBM recommends configuring a short retention interval for this service. For more information, see Monitoring > Configuring the monitoring stack > Configuring persistent storage > Modifying retention time for Prometheus metrics data within the Red Hat OpenShift Container Platform product documentation.

Before you begin

Be sure that you have the following:
  • You have administrative access to OpenShift Web Console.
  • Fusion Data Foundation Operator is installed and running in the openshift-storage namespace. In OpenShift Web Console, go to Operators > Installed Operators to view installed operators.
  • Monitoring Operator is installed and running in the openshift-monitoring namespace. In OpenShift Web Console, go to Administration > Cluster Settings > Cluster Operators to view cluster operators.
  • A storage class with provisioner openshift-storage.rbd.csi.ceph.com available. In OpenShift Web Console, go to Storage > StorageClasses to view available storage classes.

Procedure

Use the OpenShift Web Console to perform the following steps to configure Fusion Data Foundation as storage for the monitoring stack.

  1. Go to Workloads > Config Maps.
  2. Set the Project drop-down to openshift-monitoring.
  3. Click Create Config Map and edit the form.
    1. Define a new cluster-monitoring-config Config Map.
      Replace the <variables> with your own values. For example, retention: 24h or storage: 40Gi.

      Replace the storageClassName with the storageclass that uses the provisioner openshift-storage.rbd.csi.ceph.com. In the example given below the name of the storageclass is ocs-storagecluster-ceph-rbd.

      Example cluster-monitoring-config Config Map:
      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
            prometheusK8s:
              retention: <time to retain monitoring files, e.g. 24h>
              volumeClaimTemplate:
                metadata:
                  name: ocs-prometheus-claim
                spec:
                  storageClassName: ocs-storagecluster-ceph-rbd
                  resources:
                    requests:
                      storage: <size of claim, e.g. 40Gi>
            alertmanagerMain:
              volumeClaimTemplate:
                metadata:
                  name: ocs-alertmanager-claim
                spec:
                  storageClassName: ocs-storagecluster-ceph-rbd
                  resources:
                    requests:
                      storage: <size of claim, e.g. 40Gi>
  4. Click Create to save and create the Config Map.

What to do next

  1. Verify that the Persistent Volume Claims are bound to the pods.
    1. Go to Storage > Persistent Volume Claims.
    2. Set the Project dropdown to openshift-monitoring.
    3. Verify that five Persistent Volume Claims are visible with a state of Bound, attached to three alertmanager-main-* pods, and two prometheus-k8s-* pods. For example, see Figure 1.
      Figure 1. Monitoring storage created and bound
      Screenshot of OpenShift Web Console showing five pods with persistent volume claims bound in the openshift-monitoring project
  2. Verify that the new alertmanager-main-* pods appear with a state of Running.

    1. Go to Workloads > Pods.
    2. Click the new alertmanager-main-* pods to view the pod details.
    3. From Volumes verify that the volume has a Type, ocs-alertmanager-claim that matches your new Persistent Volume Claims. For example, ocs-alertmanager-claim-alertmanager-main-0. For example, see Figure 2.
      Figure 2. Persistent Volume Claims attached to alertmanager-main-* pod
      Screenshot of OpenShift Web Console showing persistent volume claim attached to the altermanager pod
  3. Verify that the new prometheus-k8s-* pods appear with a state of Running.
    1. Click the new prometheus-k8s-* pods to view the pod details.
    2. From Volumes verify that the volume has a Type, ocs-prometheus-claim that matches your new Persistent Volume Claims. For example, ocs-prometheus-claim-prometheus-k8s-0. For example, see Figure 3.
      Figure 3. Persistent Volume Claims attached to prometheus-k8s-* pod
      Screenshot of OpenShift Web Console showing persistent volume claim attached to the prometheus pod