GithubHelp home page GithubHelp logo

agnek / kafka-metrics-reporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krux/kafka-metrics-reporter

0.0 2.0 0.0 81 KB

A custom KafkaMetricsReporter intended to be dropped into a Kafka broker cluster that will send all consumer offset metrics to a configured Graphite server.

License: Apache License 2.0

Java 100.00%

kafka-metrics-reporter's Introduction

Krux Kafka Metrics Reporter

The Krux Kafka Reporter is a drop-in jar that utilizes the Kafka server custom reporting interface to automatically produce topic consumption lag stats reporting on a per-consumer/per-partition basis. It pushes those stats directly to a Graphite server configured in the Kafka configuration file. This reporter produces the same offset results as the Kafka ConsumerOffsetChecker command-line tool for all consumers currently consuming from the broker cluster.

Use

Make this jar available to a Kafka broker by placing it on the classpath, and add the following lines to your Kafka configuration...

# custom metrics logger config
kafka.metrics.reporters=com.krux.metrics.reporter.KafkaGraphiteMetricsReporter
kafka.graphite.metrics.reporter.enabled=true
kafka.graphite.metrics.host=localhost
kafka.graphite.metrics.port=2003
# optional - in a cluster, only this machine will send stats
kafka.broker.stats.sender=my.host.name.com

#full tree prefix
kafka.graphite.metrics.env=prod

#if true, log all reported metrics to stdout. Default is false. (useful for testing)
kafka.graphite.metrics.log.debug=true

Metrics will fall under a prefix of "env".kafka.consumer.topic_lag prefix, where "env" is specified by the kafka.graphite.metrics.env in the config settings above.

To prevent all brokers in your cluster from sending the same, duplicated information to Graphite, you should set the kafka.broker.stats.sender property to the fully qualified domain name of one of the machines in the broker cluster. Only that machine will forward consumer lag stats. This approach allows a single, common configuration across all hosts in your cluster.

Releases

All releases are available as pre-built jars here. You can also build the source from scratch using Maven.

mvn clean package

will produce a jar with all dependencies at target/kafka-metrics-reporter-1.1.4.jar.

kafka-metrics-reporter's People

Contributors

casspc avatar eripe970 avatar plathrop avatar

Watchers

 avatar  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.