Stan's Corner

 View Only

Monitoring RedHat OpenShift Data Foundation (ODF) performance through Instana

By SHILPA MOHANDAS posted Thu January 05, 2023 02:07 AM

  




co-authors : @Neha Ghongade, @Nithin Thomas



In this blog, we’ll show how to monitor Red Hat OpenShift Data Foundation metrics with Prometheus, and this ODF data is exported to Instana by using the Prometheus plugin of Instana. Red Hat OpenShift is a popular container platform that works with Kubernetes. Red Hat OpenShift Container Storage is a provider of persistent storage for OpenShift Container Platform.

OpenShift v4.9 onwards RedHat OpenShift Container Storage is renamed as RedHat OpenShift Data Foundation. Click here to find out more about OpenShift Data Foundation.

Architectural diagram :



ODF Storage setup :

First, you need to acquire an OCP cluster, and log in to the OpenShift web console with the kubeadmin credentials.

  1. From the OpenShift web console, install local storage from the OperatorHub:

a. Click Operators OperatorHub. Type “local storage” in the search field to find the local storage operator in the list of operators. Click OK.




   b. Click on Local Storage and install it. Set the following options on the Install Operator page:

- Set Update channel as stable-4.10.

- Set Installation mode  as a specific namespace as cluster.

- Set Installed namespace as operator recommended namespace openshift- local-storage.

- Set Approval strategy as Automatic.

 






c. Click Install. Wait and verify that the local storage operator shows the status as Succeeded on the OCP web console. Check Installed Operators.




d. Check that the following pods are up and running in the right namespace by running the following command:

oc get po –n openshift-local-storage





RedHat OpenShift Container storage has been changed to RedHat OpenShift Data Foundation, so instead of downloading the OpenShift container storage operator, you need to download RedHat OpenShift Data Foundation Operator with the same specifications as given for the container storage.

  1. From the OpenShift Web console, Install RedHat OpenShift Data Foundation from the OperatorHub.

a. Click Operators OperatorHub, type "OpenShift Data Foundation" in the search field to find OpenShift Data Foundation and then click it to Install.







  b. Set the following options on the Install Operator page:

- Set Update channel as stable-4.11.

- Set Installation mode as a specific namespace as cluster.

- Set Installed namespace as operator recommended namespace openshift-storage.

- Set  Approval strategy  as Automatic.

- Set Console plugin as Enable.
 





c.  Click Install. Wait and verify the OpenShift Data Foundation operator shows the status as Succeeded on the OCP web console. Check Installed Operators.





  1.  Login in to the OpenShift Web console and do the following actions.

a. Observe Targets, from where you get the endpoints for cluster storage.





b. You can also check this by going to NetworkingRoutes, which you can click on to get the Prometheus Console.

c.  Go to Status Targets, and check for the required endpoint.

 

Prometheus is an open-source monitoring system and alerting toolkit. It is used to monitor highly dynamic container environment. Prometheus collects metrics from targets by scraping metrics HTTP endpoints. OpenShift Container Platform ships with a pre-configured and self-updating monitoring stack based on Prometheus.







ODF storage setup is done. Now you can see how to integrate this ODF storage with Instana.

Configuring Instana Agent with Prometheus :

Instana’s software is intended particularly for use in monitoring and managing the performance and software used in microservice architectures and permits 3D visualisation of performance through graphs generated using machine learning algorithms, with notifications regarding performance also generated automatically.

Instana agents are available for both standalone VM’s and cluster environments such as Kubernetes cluster, or an OpenShift Cluster.

Here in this scenario, we will be installing agent on OCP cluster. For monitoring ODF on Instana server, we use Prometheus plugin of Instana. We do not need a Prometheus Server to be installed since ODF is using Prometheus internally as referenced in the above architecture diagram. The Prometheus sensor directly captures metrics from the endpoints exposed by the system and monitors the data.

Instana Agent Setup and Configuration :

For environments with network access, you can use any of the following methods to deploy and configure the Instana agents:

1. Helm — For more information, see helm way agent installation.
2. YAML — For more information,
see yaml way agent installation.
3. Operator — For more information,
see operator way agent installation.

Notes :

  • The image pull from the icr.io registry will be at runtime when you apply the helm chart (if the installation is done by using Helm), or apply the yaml (if the installation is done by using YAML or Operator).

  • For clusters running in an air-gapped environment, images need to be downloaded manually and pushed to your local registry. You need to update the image path in the yaml file (if the installation is done by using YAML or Operator) or the helm chart (if the installation is done using Helm).

  • Required images for cluster level (air-gapped environments) can be downloaded from icr.io/containers.instana.io as explained here. If the installation is done using Helm or YAML, you need to pull the agents and leader-elector images, and push to your local registry. If the installation is done by using Operator, you need to pull the agents and Operator, and push to your local registry.

    Use the following steps and configure Instana agent on the OpenShift Cluster:

    1.  Click InstanaDeploy AgentOpenShift, type the name of the cluster that is created, and then click Download to download the yaml file.





    1. To Configure the Prometheus plugin with Instana agent, update your yaml file with the cluster storage endpoint.

    See the following example:-

    com.instana.plugin.prometheus:
      # Global (all) endpoints username/password configuration (optional)
      username: ''
      password: ''
      customMetricSources:
      - url: '/prometheus/endpoint/1'            # metrics endpoint, the IP and port are auto-discovered
        metricNameIncludeRegex: '.*'             # regular expression to filter metrics
        username: ''                             # endpoint specific username/password configuration
        password: ''
      - url: '/prometheus/endpoint/2'
        metricNameIncludeRegex: '.*'
    

    1. Now apply the changes to yaml file as follows:

     oc apply -f agent.yaml



    1. Confirm whether your agent installation is successful using the following command:

    oc get pods -n instana-agent





    1.  To see the cluster in the agent, click PlatformsKubernetes, and then select the cluster.



    1. Now you can see that the Instana agent is installed and reporting to your Instana server.


    1. You can monitor those endpoints on the Instana default Prometheus Dashboard.

    Switch to worker node where ODF has installed. On the worker node, you can see the Prometheus dashboard is linked and metrics related to Prometheus are listed, as shown in the following screenshots,



    1. Follow below steps to create a customized dashboard to monitor some specific metrics out of all above metrics above:

      a. Switch to main page of the Instana Server.

      b. Click Create dashboard.

                   c. Adding the desired specific metrics to customized dashboard.

      For example, you want to monitor Prometheus gauge process_virtual_memory_bytes metrics because it’s available on the Prometheus metrics dashboard.





                  d. Select the Prometheus metrics specific to your worker node/host by applying the filtering mechanism as shown below:


      Hope this is a helpful exploration on monitoring ODF with Instana. If you want to find more about Instana and its monitoring capabilities, refer to this document.

      Permalink