Version 6.0.0 when building from scratch


(Zoidberg8e) #1

Hi there,

I just checked out the 5.1 branch of beats, and built filebeat there.
The filebeat.template.json clearly says it is version 5.1.1, but filebeat, when started with the -version flag always says it is version 6.0.0

./filebeat -version
filebeat version 6.0.0-alpha1 (amd64), libbeat 6.0.0-alpha1

i really don't want to use prebuilt binaries, but if I do on my testing system the filebeat tells me its version 5.1.1 as it should be.

./filebeat -version
filebeat version 5.1.1 (amd64), libbeat 5.1.1

what am I doing wrong?

Thank you


(ruflin) #2

What is the commit id you are on? If you checked out the 5.2 branch I would expect it to show 5.1.2. Just quickly tested it locally and it seems to work. How did you build the binary?


(Zoidberg8e) #3

Hi there,
I got the 5.1 branch via

git archive --format=tar --prefix=beats-5.1/ origin/5.1 | gzip >beats-5.1.tar.gz

I built the binary by running the makefile in filebeat, and before that I ran go get for all dependencies of filebeat in the beats folder.

Is there any documentation howto just build the binary, I don't want it to get packaged, as I am doing this myself.

Also there is a

Building Beats from the Source

section in the readme which isn't telling anything, but to look into the contributing which doesn't contain any information how to build from source.

Thank you


(ruflin) #4

Hm, I think with the above you get a mix of master libbeat and 5.1 version of filebeat. The following should work:

go get github.com/elastic/beats
cd $GOPATH/src/github.com/elastic/beats/filebeat
git checkout 5.1
make

(Zoidberg8e) #5

Ah, because I "go got" the libbeat in Master?

this helped a lot Thank you.


(ruflin) #6

yes. go get fetches master.


(system) #7

This topic was automatically closed after 21 days. New replies are no longer allowed.