Kafka Graphite Reporter
This is a simple kafka plugin reporting several metrics to graphite. It works with kafka 2.0.1+.
There are several similar tools present on the market, but metrics reported by this plugin are in line with metrics exposed by kafka through jmx. This feature makes transition from tools like jmxtrans easier.
Current version is 1.11
Releases are distributed on Maven central:
<dependency> <groupId>com.rtbhouse</groupId> <artifactId>kafka-graphite-reporter</artifactId> <version>1.11</version> </dependency>
Installation On Broker
- Build the
libs/directory of your kafka broker installation
- Add all dependencies of the kafka-graphite-reporter to the
libs/directory of your kafka broker installation (some of them may be already present there)
- Configure the broker (see the configuration section below)
- Restart the broker
To activate the reporter add the following entries to the 'server.properties' file of you broker installation:
The first one, metric.reporters setting is describe in kafka docs in broker configs section. The same reporter could be used not only for brokers but also for consumers and producers. The second one, kafka.metrics.reporters setting is not exposed directly in kafka docs but is used in KafkaMetricsConfig class.
You should also configure the reporter, by setting the following properties:
You could also set optional properties:
reporter.graphite.domain # default is "metrics" reporter.graphite.prefix # default is "kafka.server" reporter.graphite.use.host # default is false