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 Cloud-Native Network Functions (CNFs) OTEL Collectors gather metrics and statistics from the running CNFs Pods, and integrate with third-party software to store and visualize the CNFs Pod metrics. Most visualzation 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 CNFs Pod performance statistics and metrics.

Prometheus

The CNFs OTEL collectors are not configured to store data, but rather collect and export CNFs 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:

    kubectl apply -f prometheus.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-cnf-ingress created
    clusterrolebinding.rbac.authorization.k8s.io/prometheus-cnf-ingress created
    
  2. Verify the Prometheus Pod status:

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

    kubectl get pods -l app=prometheus -n cnf-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:

    kubectl apply -f grafana.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.

    kubectl 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:

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

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

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

    kubectl get node worker2-robin.f5.com -o wide
    

    In this example, the Node IP address is 2620:128:e008:4020::3.

    NAME                   STATUS   VERSION   INTERNAL-IP            
    worker2-robin.f5.com   Ready    v1.21.5   2620:128:e008:4020::3
    

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://[2620:128:e008:4020::3]: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 cnfdocs@f5.com.