Preferred way to upgrade beats library

Hi

I have a custom beat based upon metricbeat 6.0 now I want to build this beat against metricbeat 6.2. Just checking out the 6.2 version of the beat code and compiling doesn't work.

I got the following error:

./main.go:19:24: not enough arguments in call to instance.Run
./main.go:19:35: undefined: beater.New
make: *** [smartbeat] Error 2

I fixed this error but then I got the next one.... Is there any preferred way on how to upgrade the beat libraries?

Regards
Davy

There is unfortunately no recommended way. We try not to break the standard interfaces when possible but as you figured out yourself with the above we did as we needed it to add some new features. We are discussing since quite some time to also have a changelog for devs building beats on top of libbeat but never got to it.

What is the next error(s) you hit? Did you manage to figure it out?

Hi @ruflin

I just generated a new temporary beat based upon metricbeat 6.2 and copied over the main.go file and replaced the temporary name in the main.go file by the original name, this did the trick. Of course this worked for now but it is not guaranteed that this will work the next time.

About your suggestions about having a changelog for developers, that would be a nice thing to have. I'm already looking forward to it.

Regards
Davy

Glad you got it working. The thing that will always work is coming to the forum and ask for help as you did. Sorry that we broke your Beat as it's really awesome to see community Beats.

Also keep an eye on https://github.com/elastic/beats/pull/6245 as this should make the updating of dependencies at least a bit easier.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.