Giter Club home page Giter Club logo

kafka-riemann-reporter's Introduction

Kafka Riemann Reporter

Kafka includes support for automatically reporting various metrics (messages, bytes per topic etc.) in it's kafka.metrics.KafkaCSVMetricsReporter. This library provides an alternative which creates Riemann events.

Build Status

Using

Build the JAR and copy it to your Kafka install's ./libs directory.

$ mvn package
$ cp target/kafka-riemann-reporter-0.1-SNAPSHOT-jar-with-dependencies.jar $KAFKA_HOME/libs

Connecting directly to Riemann

You can publish metrics directly to a running Riemann service; ensure the following is in your server.properties:

kafka.metrics.polling.interval.secs=5
kafka.metrics.reporters=org.pingles.kafka.KafkaRiemannReporter
kafka.riemann.metrics.reporter.enabled=true
kafka.riemann.metrics.reporter.publisher=riemann
kafka.riemann.metrics.reporter.publisher.host=127.0.0.1
kafka.riemann.metrics.reporter.publisher.port=5555

Sending Riemann events via. Kafka

Alternatively, you can create Riemann event messages and push them to a Kafka topic. Set the following in your server.properties:

kafka.metrics.polling.interval.secs=5
kafka.metrics.reporters=org.pingles.kafka.KafkaRiemannReporter
kafka.riemann.metrics.reporter.enabled=true
kafka.riemann.metrics.reporter.publisher=kafka
kafka.riemann.metrics.reporter.publisher.topic=riemann_event

kafka-riemann-reporter's People

Contributors

pingles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kafka-riemann-reporter's Issues

Build Failure Maven

[ERROR] Failed to execute goal on project kafka-riemann-reporter: Could not resolve dependencies for project org.pingles:kafka-riemann-reporter:jar:0.1-SNAPSHOT: Failed to collect dependencies for [com.uswitch:kafka_2.9.2:jar:0.8.0-SNAPSHOT (provided), com.aphyr:riemann-java-client:jar:0.2.2 (compile), com.yammer.metrics:metrics-core:jar:2.2.0 (provided), junit:junit:jar:4.11 (test), log4j:log4j:jar:1.2.15 (compile)]: Failed to read artifact descriptor for com.uswitch:kafka_2.9.2:jar:0.8.0-SNAPSHOT: Could not transfer artifact com.uswitch:kafka_2.9.2:pom:0.8.0-SNAPSHOT from/to apache-maven (http://repo.maven.apache.org/maven2): proxy: Unknown host proxy -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Upgrade dependencies and release

Please consider upgrading dependencies like Kafka 0.8.2.1 and riemann-java-client 0.3.1, and then make a release to a public maven repository. Maybe release first 0.1 version with current dependencies.

Riemann is required to be running for Kafka to start

I've configured Kafka to use kafka-riemann-reporter to report metrics to Riemann. If I start Kafka without Riemann being available then I get this error and Kafka won't start (the process is running but it's not available for requests).

[2014-07-03 03:59:20,250] FATAL  (kafka.Kafka$)
java.lang.RuntimeException: java.io.IOException: Connection failed
    at org.pingles.kafka.KafkaRiemannReporter.initialize(KafkaRiemannReporter.java:38)
    at org.pingles.kafka.KafkaRiemannReporter.init(KafkaRiemannReporter.java:25)
    at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:60)
    at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:58)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
    at kafka.metrics.KafkaMetricsReporter$.startReporters(KafkaMetricsReporter.scala:58)
    at kafka.Kafka$.main(Kafka.scala:36)
    at kafka.Kafka.main(Kafka.scala)
Caused by: java.io.IOException: Connection failed
    at com.aphyr.riemann.client.TcpTransport.connect(TcpTransport.java:143)
...

It seems undesirable to have Kafka depending so heavily on a single instance of Riemann being available. Is it possible to have Kafka start without depending on Riemann being available?

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.