Before you Begin

  1. Install Maistra by following the instructions here.

  2. Deploy the Bookinfo application by following these instructions.

Querying metrics

  1. Generate network traffic by accessing the Bookinfo application:

    $ curl -o /dev/null http://$GATEWAY_URL/productpage
  2. A route to access the Prometheus UI should already exist. Query OpenShift for details of the route:

    $ oc get routes prometheus -n istio-system
    NAME         HOST/PORT                                  PATH      SERVICES     PORT              TERMINATION   WILDCARD
    prometheus             prometheus   http-prometheus                 None
  3. Open in a browser, you should see Prometheus' home screen, similar to this:

    prometheus home screen
  4. In the "Expression" input box enter istio_request_duration_seconds_count, and click the Execute button. You should see a screen similar to this:

    prometheus metrics
  5. It is possible to narrow down queries by using selectors. For example istio_request_duration_seconds_count{destination_workload="reviews-v2"} will only show counters with matching "destination_workload" label. For more information about using queries, please see Prometheus documentation.

  6. To list all available Prometheus metrics:

    $ oc get prometheus -n istio-system -o jsonpath='{.items[*].spec.metrics[*].name}'
    requests_total request_duration_seconds request_bytes response_bytes tcp_sent_bytes_total tcp_received_bytes_total

Note that returned metric names reported by Istio start with istio_ when used in queries. For example, requests_total will become istio_requests_total.


Follow Bookinfo cleanup instructions to remove the application.