4 Troubleshooting Kafka Issues
This topic describes the troubleshooting procedures for the Kafka issues.
- Kafka Health
This topic describes the troubleshooting procedures for the Kafka Health. - Prometheus and Grafana
This topic describes about the Troubleshooting Kafka issues using Prometheus and Grafana.
4.1 Kafka Health
This topic describes the troubleshooting procedures for the Kafka Health.
4.1.1 Verify Kafka Health
$ netstat -tlnp | grep
:9092
Note:
9092 is default port of kafkaParent topic: Kafka Health
4.1.2 Verify Zookeeper Health
Kafka instance will not start if Zookeeper is not yet started.
- Run the below command and verify.
$ netstat -tlnp | grep :2181 (2181 is default port of zookeeper)
tcp6 0 0 :::2181 :::* LISTEN 19936/java
- To debug, check if the permissions of Kafka log folder are correct.
The log folder path can be found by looking at the value of the property
log.dirs
in theserver.properties
file of Kafka installation.
Parent topic: Kafka Health
4.2 Prometheus and Grafana
This topic describes about the Troubleshooting Kafka issues using Prometheus and Grafana.
Parent topic: Troubleshooting Kafka Issues
4.2.1 Prometheus Setup
Prometheus is an open-source project, which helps monitoring of the applications metrics. It is widely used for the monitoring of Kafka and its metrics. The installer for Prometheus can be downloaded Prometheus from https://prometheus.io/download/.
Parent topic: Prometheus and Grafana
4.2.2 JMX-Exporter Setup
A JMX-Exporter application is used to integrate with the Kafka broker as a Java agent to expose the values of JMX MBeans as an API. The JMX-Exporter is used by the Prometheus to fetch the values of the JMX metrics.
Perform the following steps:
Parent topic: Prometheus and Grafana
4.2.3 Grafana Setup
Perform the following steps to integrate Grafana with the Prometheus instance installed:
Parent topic: Prometheus and Grafana
4.2.4 Prometheus Metrics
- process_cpu_seconds_total.
- http_request_duration_seconds.
- node_memory_usage_bytes.
- http_requests_total.
- process_cpu_seconds_total.
Parent topic: Prometheus and Grafana