community icon indicating copy to clipboard operation
community copied to clipboard

New community plugin for kafka

Open majormoses opened this issue 8 years ago • 6 comments

From slack: khaled [8:43 AM]  hey i made a handler for sending checks result to kafka , would it be inetresting to share it ?

 matt [8:44 AM]  @khaled absolutely!! Mind linking us to it?

 khaled [8:44 AM]  it's just a litte .rb file , how cani share it ?

majormoses I will create the repo and do some basic setup.

majormoses avatar Oct 20 '17 15:10 majormoses

Ok so here is the Handler, i didn't make options to add parameters so there is 3 stuff you may want to change manually in the code :

-the broker (kafka ip) -the name of the destination topic in kafka -and what is sended(here it's event.inspect which contain the json check result it was enough for me)

here is the code :

https://gist.github.com/bk-khaled/4f47a26258cfb9be8b5909639fa6e375

If you have trouble installing the package 'kafka' it's mostly a PATH issue ( you have to install it in the right directory) if you have trouble like : failed to send message , if kafka in a remote machine, you should change the server.properties of kafka, uncomment listners.host and put there the kafka IP, then restart kafka

Finally, add a handler, pipe type, with this file as a command to get your checks result sended to kafka

PS: this is the ruby kafka package used in the code https://github.com/zendesk/ruby-kafka

bk-khaled avatar Oct 20 '17 15:10 bk-khaled

Looks like a repo is still needed here. Very cool work @bk-khaled, we need to tackle this soon!

mbbroberg avatar Nov 29 '17 18:11 mbbroberg

Looks like we should reach out and see about incorporating this: https://github.com/uswitch/sensu-plugins-kafka-lag

majormoses avatar Jan 18 '18 21:01 majormoses

sorry for the long silence I have been quite busy. I have created the base for the kafka plugin to be worked on, once it is reviewed and merged we can start adding actual checks, handlers. etc.

majormoses avatar Apr 02 '18 20:04 majormoses

@majormoses this one looks more comprehensive: https://github.com/obazoud/sensu-plugins-kafka/

eberkut avatar Apr 10 '18 10:04 eberkut

I will reach out, sorry this got lost in the all that was going on at the time for me.

majormoses avatar May 03 '18 05:05 majormoses