Debugging the Gloo UI
You can use the Gloo UI and other observability tools to help debug your service mesh environment. But what happens when those observability tools go wrong?
If something is broken in the UI, you can check several places. The Gloo metrics pod observes traffic from the Istio sidecar in your pods to the Gloo apiserver
in the management cluster, as shown in the following figure.
Figure: Model of places to check for Gloo observability issues.
Check the Prometheus server metrics
The following example uses the Prometheus server that is deployed with Gloo by default.
-
Enable port-forwarding of the Prometheus server deployment.
kubectl port-forward -n gloo-mesh deploy/prometheus-server 9090
-
Open your local host to the port.
open http://localhost:9090/targets
-
Check for a green UP state, such as in the following figure.
Figure: Example of green UP state.
-
Check the following query: http://localhost:9090/graph?g0.expr=istio_requests_total&g0.tab=1&g0.stacked=0&g0.range_input=1h.
-
If you get an
Empty query result
from the previous step, confirm that your Gloo agents are not sending metrics to the management server.- Enable port-forwarding on the
gloo-mesh-mgmt-server
deployment.kubectl port-forward -n gloo-mesh deploy/gloo-mesh-mgmt-server 9091
- Open your local host to the port.
open http://localhost:9091/metrics
- Search for
istio_requests_total
. - If the search returns no results, debug the Gloo agents.
- Enable port-forwarding on the
-
If you see data returned, check the Prometheus queries.
- Set the
verbose
level totrue
in thegloo-mesh-enterprise
Helm chart. For more information, see Modifying Helm chart values. - Check the logs of the
gloo-mesh-ui
pod. The logs resemble the following example.{"level":"debug","ts":1650923640.6589358,"logger":"prometheus-source","caller":"prom/range.go:59","msg":"executing query sum( increase( istio_requests_total{ workload_id=~\".+.bookinfo-experiments.cluster-1|.+.gloo-mesh.cluster-1|.+.bookinfo.cluster-1|.+.bookinfo-demo.cluster-1|.+.bookinfo.cluster-2|.+.bookinfo-security.cluster-2\", destination_workload_id=~\".+..+..+\", response_code=~\"[2-3].*\", reporter=\"source\", # Exclude data from outside the mesh workload_id!=\"unknown.unknown.unknown\", }[15m] ) ) by ( workload_id, destination_workload_id, ) : "}
- Set the
-
Review the Prometheus queries for the Gloo Graph.
open http://localhost:9090/graph