Appendix B. Monitoring setup
In this appendix, we’ll provide a brief overview of how to set up a basic monitoring system for your Kafka services using Prometheus (https://prometheus.io/) and Grafana (https://grafana.com/). While this is not a dedicated monitoring guide, it will give you a foundational understanding of how to implement monitoring for your Kafka environment.
B.1 Prometheus
Prometheus is an open-source system for monitoring and alerting. It periodically scrapes the metric endpoints of the targets to be monitored and stores, in addition to the metric name, a set of labels for identification in its time-series database. Prometheus also supports service-discovery mechanisms to automatically find scrape targets. Additionally, there is the option to send metrics directly to Prometheus. Data can then be queried and aggregated using its own query language, PromQL. Alerts can also be defined based on PromQL. For visualization, Prometheus provides its own web interface.