Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/com/rtbhouse/reporter
.gitignore
LICENSE
README.md
pom.xml

README.md

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.

Version

Current version is 1.11

Distribution

Releases are distributed on Maven central:

<dependency>
    <groupId>com.rtbhouse</groupId>
    <artifactId>kafka-graphite-reporter</artifactId>
    <version>1.11</version>
</dependency>

Installation On Broker

  1. Build the kafka-graphite-reporter-1.*.jar using mvn package.
  2. Add kafka-graphite-reporter-1.*.jar to the libs/ directory of your kafka broker installation
  3. 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)
  4. Configure the broker (see the configuration section below)
  5. Restart the broker

Configuration

To activate the reporter add the following entries to the 'server.properties' file of you broker installation:

metric.reporters=com.rtbhouse.reporter.KafkaClientMetricsReporter
kafka.metrics.reporters=com.rtbhouse.reporter.KafkaMetricsReporter

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:

reporter.graphite.host
reporter.graphite.port

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
You can’t perform that action at this time.