consulthys / springbeat

Simple Beat for collecting metrics from Spring Boot apps
Other
27 stars 8 forks source link

make: *** [init] Error 2 #4

Open berrytchaks opened 7 years ago

berrytchaks commented 7 years ago

Hi,

Nice job for the beat. I built this beat and I got the following

beatuser@wouritech:~/goworkspace/src/github.com/consulthys/springbeat$ make
glide update --no-recursive
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching updates for github.com/elastic/beats.
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/elastic/beats
[INFO]  Replacing existing vendor dependencies
[WARN]  Skipping lockfile generation because full dependency tree is not being calculated
make update
make[1]: Entering directory `/home/beatuser/goworkspace/src/github.com/consulthys/springbeat'
bash ./vendor/github.com/elastic/beats/libbeat/scripts/update.sh springbeat github.com/consulthys/springbeat ./vendor/github.com/elastic/beats/libbeat
Beat name: springbeat
Beat path: ../springbeat
Start modifying beat
Update config file
Update fields
Traceback (most recent call last):
  File "./vendor/github.com/elastic/beats/libbeat/scripts/generate_template.py", line 174, in <module>
    fields_to_es_template(input, output, beat_name + "-*")
  File "./vendor/github.com/elastic/beats/libbeat/scripts/generate_template.py", line 64, in fields_to_es_template
    "doc_values": defaults["doc_values"],
KeyError: 'doc_values'
make[1]: *** [update] Error 1
make[1]: Leaving directory `/home/beatuser/goworkspace/src/github.com/consulthys/springbeat'
make: *** [init] Error 2

Any clue? Thanks.

consulthys commented 7 years ago

Thanks for reporting this. Which version of Go are you running?

berrytchaks commented 7 years ago

Thanks for the reply, I'm using

go version go1.8 linux/amd64
consulthys commented 7 years ago

Hmm, Beats is still working with Go 1.7.1 if memory serves. Spring beat should work with that version.

berrytchaks commented 7 years ago

I just gave it another try and here is what I get now

beatuser@host:~/goworkspace/src/github.com/consulthys/springbeat$ make
go build
# github.com/consulthys/springbeat/beater
beater/springbeat.go:29: undefined: common.Config
beater/springbeat.go:80: cannot use bt (type *Springbeat) as type beat.Beater in return argument:
    *Springbeat does not implement beat.Beater (missing Cleanup method)
beater/springbeat.go:86: b.Publisher.Connect undefined (type *publisher.PublisherType has no field or method Connect)
beater/springbeat.go:163: bt.client.Close undefined (type publisher.Client has no field or method Close)
make: *** [build] Error 2
consulthys commented 7 years ago

Are you using the latest Beats version? If yes, that's probably the reason as I haven't yet upgraded springbeat to use the latest Beats.

berrytchaks commented 7 years ago
Are you using the latest Beats version? 

Yes

If I have to downgrade the beat version, which version will be the most adequate? Thanks.

consulthys commented 7 years ago

I think it was Beats 5.0.1 at the time. You can give it a shot, but I'll have to update all my Beats very soon anyway

c0dingarchit3ct commented 7 years ago

The instructions assumed a fully functioning GO environment and even then the build breaks as others indicate. I wonder what is the difference between this and other beats products where you just download the package (instead of making it) and execute it?. I have been using filebeat and heartbeat with no issue on Mac OSX, this somehow seemed impossible!.