Metrics
Use Istio metrics that the workload's sidecar proxies emit to monitor and troubleshoot traffic in your service mesh.
The information in this guide assumes that you have a Gloo Mesh Enterprise license and that you followed the Gloo Mesh getting started guide to install Gloo, install Istio in the workload clusters, and deploy the Bookinfo app.
-
Set up port forwarding for the product page of the Istio Bookinfo app.
kubectl -n bookinfo port-forward deploy/productpage-v1 9080 --context $REMOTE_CONTEXT1
-
Send multiple requests to the product page. Each request to the product page requires the product page to collect data from other Bookinfo microservices. For each request, metrics are automatically sent to the Prometheus server.
for ((i=1;i<=10;i++)); do curl -I -k "http://localhost:9080/productpage"; done
-
From the Prometheus UI, enter the following PromQL query to see how many requests the product page's Envoy proxy in
cluster1
sent to other Bookinfo microservices.sum(istio_requests_total{source_workload="productpage-v1"}) by (workload_id,destination_workload_id, response_code)
-
Explore other queries that you run in the Prometheus UI to gain insight into your service mesh.
Metric | PromQL query |
---|---|
Request rate for a given service | rate(istio_requests_total{destination_app="<service_ID>"}[5m]) |
Request rate between source and destination workload | rate(istio_requests_total{source_workload="<source_workload>", 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) |