Metrics

Use Istio metrics that the ingress gateway emits to monitor and troubleshoot the requests that pass through your ingress gateway.

The information in this guide assumes that you have a Gloo Gateway license and that you followed the Gloo Gateway getting started guide to install Gloo Gateway, and deploy the Bookinfo app without Istio sidecars.

  1. Open the Prometheus UI.

  2. Send multiple requests to the reviews page.

    for ((i=1;i<=10;i++)); do curl -vik --resolve www.example.com:80:${INGRESS_GW_IP} http://www.example.com:80/reviews/1 ; done
    
    for ((i=1;i<=10;i++)); do curl -vik --resolve www.example.com:443:${INGRESS_GW_IP} https://www.example.com:443/reviews/1 ; done
    

  3. From the Prometheus expression browser, enter the following PromQL query to see the requests that were sent to the ingress gateway.

    istio_requests_total
    
  4. Explore other queries that you run in the Prometheus expression browser to gain insight into your API Gateway.

Metric PromQL query
Request rate for Gloo Gateway rate(istio_requests_total{source_workload="istio-ingressgateway-1-19"}[5m])
Request rate between Gloo Gateway and a destination workload rate(istio_requests_total{source_workload="istio-ingressgateway-1-19", destination_workload="<workload_ID>"}[5m])
Successful request rate to a destination workload rate(istio_requests_total{response_code=~"[2-3].*", destination_workload="<workload_ID>"}[5m])
Rate of failing requests to a destination workload rate(istio_requests_total{response_code=~"[4-5].*", destination_workload="<workload_ID>"}[5m])
Number of new requests within a certain timeframe sum(increase(istio_requests_total{}[5m])) by (workload_id, destination_workload_id)

For more information about the built-in Prometheus, see the Prometheus server setup and the Prometheus observability tool overview.