Debug the Gloo UI graph

If you do not see any data in the Gloo UI graph, review the following steps to debug the metrics pipeline and the Gloo UI deployment. Note that the steps vary depending on the metrics pipeline that you set up during your installation.

  1. Enable port-forwarding of the Prometheus server deployment.

    kubectl port-forward -n gloo-mesh deploy/prometheus-server 9090
  2. Open the scraping endpoints that are configured for the Prometheus server.

    open http://localhost:9090/targets
  3. Check for a green UP state, such as in the following figure.

    Figure: Example of green UP state.

    Figure: Example of green UP state.

  4. Check the following query: http://localhost:9090/graph?g0.expr=istio_requests_total&

  5. If you get an Empty query result from the previous step, debug your metrics pipeline.

    Follow the steps in Monitor the health of receivers, exporters, and processors to verify that metrics are being scraped by the Gloo collector agents and sent to the telemetry gateway.
    1. Open the management server dashboard.
      meshctl proxy
    2. In your browser, connect to http://localhost:9091/metrics.
    3. Search for the istio_requests_total metric.
    4. If the search returns no results, debug the Gloo agents.
    5. If you see data returned, check the Prometheus queries.
      1. Get your current Helm values for the management cluster. Change the release name as needed.

        helm get values gloo-platform -n gloo-mesh --kube-context $MGMT_CONTEXT > mgmt-server.yaml
        open mgmt-server.yaml
      2. Delete the first line that contains USER-SUPPLIED VALUES:, and save the file.

      3. Upgrade your Helm release in the management cluster. Include the --set common.verbose=true flag.

        helm upgrade gloo-platform gloo-platform/gloo-platform \
           --kube-context $MGMT_CONTEXT \
           --namespace gloo-mesh \
           --version $UPGRADE_VERSION \
           -f mgmt-server.yaml \
           --set common.cluster=$MGMT_CLUSTER \
           --set licensing.glooGatewayLicenseKey=$GLOO_GATEWAY_LICENSE_KEY \
           --set common.verbose=true
      4. Check the logs of the gloo-mesh-ui pod. To view logs recorded since a relative duration such as 5s, 2m, or 3h, you can specify the --since <duration> flag.

        meshctl logs ui --kubecontext $MGMT_CONTEXT [--since DURATION]

        The logs resemble the following example.

        {"level":"debug","ts":1650923640.6589358,"logger":"prometheus-source","caller":"prom/range.go:59","msg":"executing query 
              # Exclude data from outside the mesh
          ) by (
        : "}
      5. Review the Prometheus queries for the Gloo UI Graph.

        open http://localhost:9090/graph