Setting up Grafana

Before jumping into how we install Grafana, there are a few prerequisites that we require. We should have both Kubernetes and Istio version 0.7 up and running, and we need to deploy an application for monitoring purposes. We also need to have the Prometheus server running on same box for service discovery. Our sample architecture will look as follows:

Our target nodes could be anything from application servers, API Servers, databases, or nodes. Prometheus will help us to discover these metrics and pull the data, as we have seen previously. Here, we are going to use the Grafana Web UI to visualize a dashboard and graphs:

  1. From the Istio base directory, use the following command to install Grafana. In our example, we have already installed Grafana:
kubectl create -f install/kubernetes/addons/grafana.yaml

The output is as follows:

  1. Grafana UI will run on 3000 port. The ports should be opened from the network side, and we need to execute the following command to carry out port forwarding:
 kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &

The output is as follows:

  1. If you are using Linux VMs, use the following command to carry out port mapping from your Command Prompt:
Ssh -L 3000:127.0.0.1:3000 [email protected]

The output is as follows:

  1. Visit http://localhost:3000 to access the Grafana UI. It will look as follows:

  1. After we have installed Isto and the sample application, Grafana will create a few dashboards for us. Click on Dashboard to see the default dashboards:

  1. We can click on Istio Mesh Dashboard to see the global request volume and look at our success and failure rate. It will also show you the 4xx and 5xx error codes. To find out more information, we can click on any of the services:

Istio Mesh Dashboard
  1. The Istio Service Dashboard will look as follows. We can monitor the client request volumes, the server request volumes, the client/server request duration, and the client/server request volumes. We can set up alerts on these metrics easily:

Istio Service Dashboard

The following dashboard will show us the workload on our service or infrastructure by providing us with common metrics such as incoming request volume and request duration. We can also learn about how our network is doing, including the inbound workload and the outbound workload. We can play around with these metrics to create new dashboards:

Istio Workload Dashboard
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.51.117