Configuring cluster monitoring

Red Hat® OpenShift® Container Platform includes a preconfigured monitoring stack that you can use to monitor IBM® Cloud Pak for Network Automation.

Learn how to configure monitoring, including how to check that Prometheus can collect metrics and changing the retention time for Prometheus data:
Tip:

Prometheus is an open source monitoring and alerting toolkit and is deployed by default on OpenShift Container Platform clusters. To learn more about OpenShift Container Platform monitoring and Prometheus, see Monitoring overview (Red Hat OpenShift Container Platform 4.16).

Verifying that the metric endpoints are exposed to Prometheus

Before the orchestration metrics can be collected and stored in Prometheus, the metric endpoints must be exposed to Prometheus. During the installation of IBM Cloud Pak for Network Automation, you deploy the cluster-monitoring-config and user-workload-monitoring-config config maps, which enable Prometheus to collect the metrics.

Important: If your deployment of Red Hat OpenShift Container Platform is managed by third party software, you might not need to deploy those config maps. For example, your deployment might be managed by Red Hat software.
Run the following command to verify that the metric endpoints are exposed and the pods are running:
oc get pods -n openshift-user-workload-monitoring
If your environment is configured correctly, output that is similar to the following example is shown:
NAME                                   READY   STATUS    RESTARTS      AGE
prometheus-operator-7dfbcd85c9-ll8c9   2/2     Running   0             16h
prometheus-user-workload-0             6/6     Running   0             16h
prometheus-user-workload-1             6/6     Running   0             16h
thanos-ruler-user-workload-0           3/3     Running   0             16h
thanos-ruler-user-workload-1           3/3     Running   1 (10h ago)   16h

For more information about how to expose the metric endpoints, see Preparing to install IBM Cloud Pak for Network Automation Orchestration Manager.

Checking the status of your metric endpoints

You can use the OpenShift Container Platform console to check the status of your metric endpoints and the last time that the endpoints were scraped.

Complete the following steps:
  1. Log in to your OpenShift Container Platform cluster console.
  2. From the navigation menu, click Observe > Targets

    On the Targets page, you can see the status of the endpoints that are exposed for Prometheus to gather metrics. You can also see the service monitor that is used to gather metrics from the endpoint and the last time that the endpoint was scraped.

Changing the retention time for Prometheus metrics data

By default, the retention time for Prometheus data is configured in OpenShift Container Platform to be 15 days. However, you can modify the retention time to change how soon the data is deleted.

For more information about modifying the retention time, see Modifying the retention time and size for Prometheus metrics data (Red Hat OpenShift Container Platform 4.16).