Getting Readyedit

All Beats are written in Go, so having Go installed and knowing the basics are prerequisites for understanding this guide. But don’t worry if you aren’t a Go expert. Go is a relatively new language, and very few people are experts in it. In fact, several people learned Go by contributing to Packetbeat and libbeat, including the original Packetbeat authors.

For general information about contributing to Beats, see Contributing to Beats.

After you have installed Go and set up the GOPATH environment variable to point to your preferred workspace location, clone the Beats repository in the correct location under GOPATH:

mkdir -p ${GOPATH}/src/github.com/elastic
git clone https://github.com/elastic/beats ${GOPATH}/src/github.com/elastic/beats

To build your beat on a specific version of libbeat, check out the specific branch (6.7 in the example below):

cd ${GOPATH}/src/github.com/elastic/beats
git checkout 6.7

If you have multiple go paths, use ${GOPATH%%:*} instead of ${GOPATH}.