Grafana

Grafana is an open source monitoring solution that can be used to configure dashboards for Istio. You can use Grafana to monitor the health of Istio and of applications within the service mesh.

Configuration

While you can build your own dashboards, Istio offers a set of preconfigured dashboards for all of the most important metrics for the mesh and for the control plane.

There are a few ways to configure Grafana to use these dashboards:

Use the built-in Grafana deployment

The built-in deployment of Grafana is bundled with all of the Istio dashboards already installed. To deploy the built-in Grafana instance, follow the steps in Customizable Install with Istioctl to install Istio and pass --set values.grafana.enabled=true during installation.

This built-in deployment of Grafana is intended for new users quickly getting started. However, it does not offer advanced customization, like persistence or authentication.

Import from grafana.com

To quickly import the Istio dashboards to an existing Grafana instance, you can use the Import button in the Grafana UI to add the dashboard links above. When you import the dashboards, note that you must select a Prometheus data source.

You can also use a script to import all dashboards at once. For example:

  1. # Address of Grafana
  2. GRAFANA_HOST="http://localhost:3000"
  3. # Login credentials, if authentication is used
  4. GRAFANA_CRED="USER:PASSWORD"
  5. # The name of the Prometheus data source to use
  6. GRAFANA_DATASOURCE="Prometheus"
  7. # The version of Istio to deploy
  8. VERSION=1.6
  9. # Import all Istio dashboards
  10. for DASHBOARD in 7639 11829 7636 7630 7642 7645; do
  11. REVISION="$(curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions -s | jq ".items[] | select(.description | contains(\"${VERSION}\")) | .revision")"
  12. curl -s https://grafana.com/api/dashboards/${DASHBOARD}/revisions/${REVISION}/download > /tmp/dashboard.json
  13. echo "Importing $(cat /tmp/dashboard.json | jq -r '.title') (revision ${REVISION}, id ${DASHBOARD})..."
  14. curl -s -k -u "$GRAFANA_CRED" -XPOST \
  15. -H "Accept: application/json" \
  16. -H "Content-Type: application/json" \
  17. -d "{\"dashboard\":$(cat /tmp/dashboard.json),\"overwrite\":true, \
  18. \"inputs\":[{\"name\":\"DS_PROMETHEUS\",\"type\":\"datasource\", \
  19. \"pluginId\":\"prometheus\",\"value\":\"$GRAFANA_DATASOURCE\"}]}" \
  20. $GRAFANA_HOST/api/dashboards/import
  21. echo -e "\nDone\n"
  22. done

A new revision of the dashboards is created for each version of Istio. To ensure compatibility, it is recommended that you select the appropriate revision for the Istio version you are deploying.

Implementation-specific methods

Grafana can be installed and configured through other methods. To import Istio dashboards, refer to the documentation for the installation method. For example:

See also

Prometheus

How to integrate with Prometheus.

cert-manager

Information on how to integrate with cert-manager.