Performance Visualization

Visualizing Pod health and performance statistics using a graphical interface reduces the complexity of managing clusters, and helps to avoid service outages resultng from lack of capacity or over-utilization. The Service Proxy for Kubernetes OTEL Collectors gather metrics and statistics from the running SPK Pods, and integrate with third-party software to store and visualize the SPK Pod metrics. Most visualization software provides the ability to create custom dashboards, to catagorize and select between sets of Pod metrics and statistics.

This document demonstrates a very simple Prometheus and Grafana installation to visualize SPK Pod performance statistics and metrics.

Prometheus

The SPK OTEL collectors are not configured to store data, but rather collect and export SPK Pod data to Prometheus. Prometheus thens receives the data from the OTEL collectors on TCP service port 9090. Setting Prometheus data retention limits should be based on your organization requirements.

Download and adapt the basic Prometheus template, and be aware of these important parameter values:

  • Change the NAMESPACE values to the BIG-IP controller namespace. There are eight instances in total.
  • The image parameter pulls an image from the internet. You may need to target your local registry if the cluster doesn’t have internet access.

Grafana

Grafana can be configured to use Prometheus as a data source, and once selected, the list of available OTEL statistics can then be searched and used to obtain Pod statistics. Each query can viewed, and then saved as a dashboard to be used on a regular basis.

Download and adapt the basic Grafana template, and be aware of these important parameter values:

  • Change the NAMESPACE value to the BIG-IP controller namespace. There is a single instance.
  • The image parameter pulls an image from the internet. You may need to target your local registry if the cluster doesn’t have internet access.

Requirements

Ensure you have:

Procedures

Install the Pods

Use these steps to install the Prometheus and Grafana Pods, and verify they are running.

  1. Install the Promethues Pod using the modified template:

    oc apply -f spk-prom-temp.yaml
    

    The command output should resemble the example below.

    deployment.apps/prometheus created
    configmap/prometheus-config created
    service/prometheus-service created
    clusterrole.rbac.authorization.k8s.io/prometheus-spk-ingress created
    clusterrolebinding.rbac.authorization.k8s.io/prometheus-spk-ingress created
    
  2. Verify the Prometheus Pod status:

    In this example, the Prometheus installation is in the spk-ingress namespace.

    oc get pods -l app=prometheus -n spk-ingress
    

    The command output should indicate the Pod is Running.

    NAME                             READY   STATUS    RESTARTS
    pod/prometheus-6974888c4-64c29   1/1     Running   0       
    
  3. Install the Grafana Pod using the modified template:

    oc apply -f spk-graf-temp.yaml
    

    The command output should resemble the examle below.

    deployment.apps/grafana created
    configmap/grafana-datasources created
    service/grafana created
    
  4. Verify the Grafana Pod status:

    In this example, the Grafana Pod installation is in the default namespace.

    oc get pods -l app=grafana -n default
    

    In this example, the Grafana Pod status is Running.

    NAME                       READY   STATUS    RESTARTS
    grafana-5bc6bf9dbc-dbq68   1/1     Running   0     
    
  5. Obtain the Node name that the Grafana Pod is scheduled on:

    oc get pods -l app=grafana -n default -o jsonpath='{..nodeName}{"\n"}'
    

    In this example, the Grafana Pod is running on the worker2-ocp.f5.com node.

    worker2-ocp.f5.com
    
  6. Obtain the IP address of the Node. The IP address will be used to connect to the Grafana UI:

    oc get node worker2-ocp.f5.com -o wide
    

    In this example, the Node IP address is 10.244.100.10.

    NAME                   STATUS   VERSION   INTERNAL-IP            
    worker2-ocp.f5.com   Ready    v1.21.5   10.244.100.10
    

Build the dashboard

Use these steps to create a new dashboard that will track connection statistics for an F5BigContextSecure CR.

  1. Using a web browser, connect to the Grafana UI:

    Note: The username and password are admin. Change the password when prompted.

    http://10.244.100.10:32000/login
    
  2. To the left, select the Dashboards icon (four squares), and then click + New dashboard.

  3. Select Add a new panel.

  4. To the lower left, from the Data source drop-down select prometheus.

  5. To the bottom left, under Metric click Select metric.

    Note: You can either scroll through the available options, or search by typing a keyword.

  6. Type the keyword vs_clientside_tot_conns, and select the SecureContext virtual server query ending with clientside_tot_conns.

  7. To the bottom left, scroll down and select + Query to add a second query to the panel.

  8. Type the keyword vs_serverside_tot_conns, and select the SecureContext virtual server query ending with serverside_tot_conns.

  9. Click Run queries, and view the statistics under Panel Title.

  10. To the middle/right, under Title type a name for the panel. For example, Egress Context - Total Conns.

  11. To the top/left, click Apply. The new panel has been added to the dashboard.

  12. To the upper/middle, select Save dashboard (floppy disk icon).

  13. In the Save dashboard area locate Dashboard name, and describe the new dashboard. For example, Secure Contexts - Total Conns.

  14. Click the Save button. The new dashboard and panel are now saved, and can be referenced later.

Feedback

Provide feedback to improve this document by emailing spkdocs@f5.com.