Grafana is an open source a tool for creating monitoring and metric analytics and dashboards. You use Grafana to query, visualize, and alert on your metrics no matter where they are stored: Graphite, Elasticsearch, OpenTSDB, Prometheus, or InfluxDB. Istio includes monitoring via Prometheus and Grafana.

This tutorial uses Service Mesh and the bookinfo tutorial to demonstrate how to set up and use the Istio Dashboard to monitor mesh traffic. As part of this task, you install the Grafana Istio add-on to view service mesh traffic data.

Accessing the Grafana dashboard

The Grafana dashboard’s web-based interface lets you visualize your metrics data.

  • OpenShift Container Platform 3.11 or higher installed.

  • Red Hat OpenShift Service Mesh 0.12.TechPreview installed.

  • Bookinfo demonstration application installed.

  1. A route to access the Grafana dashboard already exists. Query for details of the route:

      $ export GRAFANA_URL=$(oc get route -n istio-system grafana -o jsonpath='{}')
  2. Launch a browser and navigate to navigate to http://<GRAFANA_URL>;. You see Grafana’s home screen, as shown in the following figure:

    ossm grafana home screen
  3. From the menu in the upper-left corner, select Istio Mesh Dashboard to see Istio mesh metrics.

    ossm grafana mesh no traffic
  4. Generate some traffic by accessing the Bookinfo application:

    $ curl -o /dev/null http://<GATEWAY_URL>/productpage

    The dashboard reflects the traffic through the mesh, similar to the following figure:

    ossm grafana mesh with traffic
  5. To see detailed metrics for a Service, click on a Service name in the Service column. The Service dashboard resembles the following figure:

    ossm grafana services

    Note that TCP Bandwidth metrics are empty, because Bookinfo only uses http-based Services. The dashboard also displays metrics for Workloads that call the Client Workloads Service and for Workloads that process requests from the Service Workloads. You can switch to a different Service or filter metrics by client and Service Workloads by using the menus at the top of the dashboard.

  6. To switch to the Workloads dashboard, click Istio Workload Dashboard on the menu in the upper-left corner. You will see a screen resembling the following figure:

    ossm grafana workloads

    This dashboard shows Workload metrics and metrics for client (inbound) and Service (outbound) Workloads. You can switch to a different Workload; to filter metrics by inbound or outbound Workloads, use the menus at the top of the dashboard.