Simple Zabbix template to monitor kafka clusters. This template is strongly based on @helli0n kafka-monitoring, but instead of using a custom discovery script it uses the built-in JMX discovery. The JMX item protocol has changed since version 3.4, this template uses the new syntax.
Before using this template, you'll need to install and configure Zabbix Java Gateway. You can quickly install it through most packet managers:
yum install zabbix-java-gataway
or
apt-get update && apt-get install zabbix-java-gateway
You also need to configure Zabbix Server to communicate with the Java Gateway
You need to enable the JMX port on every Kafka node.
You can do so by adding the following string to the $KAFKA_JMX_OPTS
env variable:
-Dcom.sun.management.jmxremote.port=$PORT
Change $PORT
with the chosen JMX port.
On Zabbix you simply need to add a JMX interface to each of the Kafka cluster's node. The JMX port is the same used to bootstrap Kafka on every node.
There are some discovery rules in order to automatically discover some informations.
By default, the metrics related to the __consumer_offset topic won't be picked up. You can enable it by removing the {#JMXTOPIC}
Macro filter in the related discovery rules.
At the moment, this template is for broker metrics only. If you want to include metrics from consumers, procuders, etc etc, you're free to put up a merge request.