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:
- Enabled the OTEL Collectors.
- Installed the BIG-IP Controller.
- Modified the provided templates (above).
- A Linux based workstation.
Procedures¶
Install the Pods¶
Use these steps to install the Prometheus and Grafana Pods, and verify they are running.
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
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
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
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
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
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.
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
To the left, select the Dashboards icon (four squares), and then click + New dashboard.
Select Add a new panel.
To the lower left, from the Data source drop-down select prometheus.
To the bottom left, under Metric click Select metric.
Note: You can either scroll through the available options, or search by typing a keyword.
Type the keyword vs_clientside_tot_conns, and select the SecureContext virtual server query ending with clientside_tot_conns.
To the bottom left, scroll down and select + Query to add a second query to the panel.
Type the keyword vs_serverside_tot_conns, and select the SecureContext virtual server query ending with serverside_tot_conns.
Click Run queries, and view the statistics under Panel Title.
To the middle/right, under Title type a name for the panel. For example, Egress Context - Total Conns.
To the top/left, click Apply. The new panel has been added to the dashboard.
To the upper/middle, select Save dashboard (floppy disk icon).
In the Save dashboard area locate Dashboard name, and describe the new dashboard. For example, Secure Contexts - Total Conns.
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.