Git Product home page Git Product logo

kafka-graphite's Introduction

Kafka Graphite Metrics Reporter

Build Status

This is a simple reporter for kafka using the GraphiteReporter. It works with kafka 0.8.x version.

Big thanks to Maxime Brugidou from Criteo who did the initial commit of the Ganglia version, available here https://github.com/criteo/kafka-ganglia

Install On Broker

  1. Build the kafka-graphite-1.0.2.jar jar using mvn package or download it from the releases. Hint: The jar will include the metrics-graphite dependency which is not brought by Kafka.
  2. Add kafka-graphite-1.0.2.jar to the libs/ directory of your kafka broker installation
  3. Configure the broker (see the configuration section below)
  4. Restart the broker

Configuration

Edit the server.properties file of your installation, activate the reporter by setting:

kafka.metrics.reporters=com.criteo.kafka.KafkaGraphiteMetricsReporter
kafka.graphite.metrics.reporter.enabled=true

You may also specify multiple comma-separated reporter classes for the kafka.metrics.reporters property:

kafka.metrics.reporters=com.criteo.kafka.KafkaGraphiteMetricsReporter,kafka.metrics.KafkaCSVMetricsReporter[,....]

Here is a list of default properties used:

kafka.graphite.metrics.host=localhost
kafka.graphite.metrics.port=2003
kafka.graphite.metrics.group=kafka
# This can be use to exclude some metrics from graphite 
# since kafka has quite a lot of metrics, it is useful
# if you have many topics/partitions. For example :
kafka.graphite.metrics.exclude.regex=(kafka.network.*|kafka.*.topic.*)

# Each metric provides multiple dimensions: min, max, meanRate, etc
# This might be too much data.
# It is possible to disable some metric dimensions with the following properties:
# By default all dimensions are enabled. Only the unwanted dimensions have to be configured
kafka.graphite.dimension.enabled.count=false
kafka.graphite.dimension.enabled.meanRate=false
kafka.graphite.dimension.enabled.rate1m=false
kafka.graphite.dimension.enabled.rate5m=false
kafka.graphite.dimension.enabled.rate15m=false
kafka.graphite.dimension.enabled.min=false
kafka.graphite.dimension.enabled.max=false
kafka.graphite.dimension.enabled.mean=false
kafka.graphite.dimension.enabled.sum=false
kafka.graphite.dimension.enabled.stddev=false
kafka.graphite.dimension.enabled.median=false
kafka.graphite.dimension.enabled.p75=false
kafka.graphite.dimension.enabled.p95=false
kafka.graphite.dimension.enabled.p98=false
kafka.graphite.dimension.enabled.p99=false
kafka.graphite.dimension.enabled.p999=false

Known Issues

With Kafka <= 0.8.2.2 there is an issue if topics get deleted or partions are moved between brokers. The metrics are not get deleted in this case and because they are implemented as a Gauge, a NoSuchElementException is thrown when the metrics are reported.

There is already a fix for this, see KAFKA-1866 but it did not make it into an 0.8.x release. Because of this we implemented a workaround for this within the FilterMetricsPredicate.

kafka-graphite's People

Contributors

chuckwired avatar damienclaveau avatar fede1024 avatar frederic-schmaljohann avatar fwuzju avatar msiuts avatar petere avatar tobi-sh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.