Querying Metrics from Prometheus

    The Bookinfo sample application is used asthe example application throughout this task.

    in your cluster and deploy anapplication.

    • Verify that the service is running in your cluster.

    In Kubernetes environments, execute the following command:

    • Send traffic to the mesh.

    For the Bookinfo sample, visit http://$GATEWAY_URL/productpage in your webbrowser or issue the following command:

      $GATEWAY_URL is the value set in the example.

      • Open the Prometheus UI.

      In Kubernetes environments, execute the following command:

      Visit http://localhost:9090/graph in your web browser.

      • Execute a Prometheus query.

      In the “Expression” input box at the top of the web page, enter the text:istio_requests_total. Then, click the Execute button.

      Prometheus Query Result

      Other queries to try:

      • Total count of all requests to the productpage service:
      1. istio_requests_total{destination_service="productpage.default.svc.cluster.local"}
      • Total count of all requests to v3 of the reviews service:

      This query returns the current total count of all requests to the v3 of the service.

      • Rate of requests over the past 5 minutes to all instances of the productpage service:
      1. rate(istio_requests_total{destination_service=~"productpage.*", response_code="200"}[5m])

      Mixer comes with a built-in Prometheus adapter thatexposes an endpoint serving generated metric values. The Prometheus add-on is aPrometheus server that comes preconfigured to scrape Mixer endpoints to collectthe exposed metrics. It provides a mechanism for persistent storage and queryingof Istio metrics.

      The configured Prometheus add-on scrapes the following endpoints:

      • istio-telemetry.istio-system:15014: The istio-telemetry job returns all Mixer-specific metrics. Use this endpoint to monitor Mixer itself.
      • istio-proxy:15090: The envoy-stats job returns raw stats generated by Envoy. Prometheus is configured to look for pods with the endpoint exposed. The add-on configuration filters out a large number of envoy metrics during collection in an attempt to limit the scale of data by the add-on processes.
      • istio-pilot.istio-system:15014: The pilot job returns the Pilot-generated metrics.
      • istio-galley.istio-system:15014: The galley job returns the Galley-generated metrics.
      • istio-policy.istio-system:15014: The istio-policy job returns all policy-related metrics.
      • istio-citadel.istio-system:15014: The istio-citadel job returns all Citadel-generated metrics.For more on querying Prometheus, please read their .
      • Remove any processes that may still be running:

      Collecting Metrics

      This task shows you how to configure Istio to collect and customize metrics.

      Mixer and the SPOF Myth

      Improving availability and reducing latency.

      Provides an overview of Mixer's plug-in architecture.

      Jaeger

      了解如何配置代理以向 Jaeger 发送追踪请求。

      How to configure the proxies to send tracing requests to LightStep.