gingerwizard / kafkabeat

Other
17 stars 9 forks source link

Installation issues #1

Open mikesparr opened 8 years ago

mikesparr commented 8 years ago

I followed the clone instructions in your readme and all Go paths are working, but the make command fails and trying go get ... also errs out. Any insights into what I'm doing wrong to get this built? Thanks!


██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard ] 
$ git clone https://github.com/gingerwizard/kafkabeat
Cloning into 'kafkabeat'...
remote: Counting objects: 54, done.
remote: Total 54 (delta 0), reused 0 (delta 0), pack-reused 54
Unpacking objects: 100% (54/54), done.
Checking connectivity... done.

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard ] 
$ cd kafkabeat/

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ ls
CONTRIBUTING.md Makefile    TODO        config      docs        glide.yaml  kafkabeat.yml   main_test.go
LICENSE     README.md   beater      dev-tools   etc     kafkabeat.iml   main.go     tests

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ make
make: glide: No such file or directory
make: *** [init] Error 1

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ make update
make: *** No rule to make target `update'.  Stop.

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ make fmt
make: *** No rule to make target `fmt'.  Stop.

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ make clean
make: *** No rule to make target `clean'.  Stop.

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ go get github.com/gingerwizard/kafkabeat
# github.com/gingerwizard/kafkabeat/beater
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:136: b.Events undefined (type *beat.Beat has no field or method Events)
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:168: b.Events undefined (type *beat.Beat has no field or method Events)
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:238: res.GetBlock undefined (type *sarama.OffsetFetchResponse has no field or method GetBlock)

██ [ mike@Mikebook-Pro-SSD ~/Dev/LearnGo/github.com/gingerwizard/kafkabeat ] (master) 
$ go install github.com/gingerwizard/kafkabeat
# github.com/gingerwizard/kafkabeat/beater
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:136: b.Events undefined (type *beat.Beat has no field or method Events)
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:168: b.Events undefined (type *beat.Beat has no field or method Events)
../../../src/github.com/gingerwizard/kafkabeat/beater/kafkabeat.go:238: res.GetBlock undefined (type *sarama.OffsetFetchResponse has no field or method GetBlock)
mikesparr commented 8 years ago
$ go version
go version go1.6.2 darwin/amd64
mikesparr commented 8 years ago

It appears the beat library no longer has code you are referencing. In checking the latest topbeat I see they import another library called publisher and set the beat event = publisher.Client. I edited your code to better match the current topbeat and got the build/install to work and with a vanilla install of Kafka it outputs the following when running. I will fork and issue a pull request with my changes if interested.

2016/06/15 19:06:10.301639 kafkabeat.go:155: INFO Partitions retrieved for topic diffusion
2016/06/15 19:06:10.301686 kafkabeat.go:210: DBG  Processing partition 0
2016/06/15 19:06:10.302391 kafkabeat.go:215: DBG  Current log size is 0 for partition 0
2016/06/15 19:06:10.302470 client.go:176: DBG  Publish: {
  "@timestamp": "2016-06-15T19:06:10.302Z",
  "beat": {
    "hostname": "Mikebook-Pro-SSD.local",
    "name": "Mikebook-Pro-SSD.local"
  },
  "partition": 0,
  "size": 0,
  "topic": "diffusion",
  "type": "topic"
}
2016/06/15 19:06:10.302491 kafkabeat.go:174: INFO 1 Events sent
2016/06/15 19:06:11.303905 output.go:108: DBG  output worker: publish 1 events
{
  "@timestamp": "2016-06-15T19:06:10.302Z",
  "beat": {
    "hostname": "Mikebook-Pro-SSD.local",
    "name": "Mikebook-Pro-SSD.local"
  },
  "partition": 0,
  "size": 0,
  "topic": "diffusion",
  "type": "topic"
}
Gmanweb commented 7 years ago

Hi Mikesparr did you manage to get kafkabeat running and displaying the lag and offset?

mikesparr commented 7 years ago

Only with my proposed pull request. Newer versions of libbeat may have changed since you first built, so I had to tweak a few methods to get it to work.

Please review my PR as using "go get ..." still pulls in your deps even on my forked version then I have to manually overwrite every deploy.

Sent from my iPhone

On Oct 5, 2016, at 6:57 AM, Gearoid Maguire notifications@github.com wrote:

Hi Mikesparr did you manage to get kafkabeat running and displaying the lag and offset?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.