Summary
In this chapter, we learned how to use Prometheus and Grafana to collect and monitor alerts on performance metrics.
We saw that, to collect performance metrics, we can use Prometheus in a Kubernetes environment. We then learned how Prometheus can automatically collect metrics from a Pod when a few Prometheus annotations are added to the Pod’s definition. To produce metrics in our microservices, we used Micrometer.
Then, we saw how we can monitor the collected metrics using dashboards in both Kiali and Grafana, which comes with the installation of Istio. We also experienced how to consume dashboards shared by the Grafana community, and learned how to develop our own dashboards, where we used metrics from Resilience4j to monitor the usage of its circuit breaker and retry mechanisms. Using the Grafana API, we can export created dashboards and import them into other Grafana instances.
Finally, we learned how to define alerts on metrics in Grafana and how to...