- Golang 1.7
Install GO and beat dependencies. Ignore this step if setup already exists.
- Install GO binary
wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
sudo tar -C /opt -xzf go1.10.3.linux-amd64.tar.gz
Add /etc/profile or $HOME/.bash_profile
PATH=$PATH:$HOME/bin:/opt/go/bin
GOPATH=/opt/go
export PATH GOPATH
source ~/.bash_profile
- Install Python env config
sudo pip install virtualenv
sudo /usr/bin/easy_install virtualenv
- Install beat dependecies
mkdir -p ${GOPATH}/src/github.com/elastic
git clone https://github.com/elastic/beats ${GOPATH}/src/github.com/elastic/beats
To clone beat from the git repository, run the following commands
mkdir -p ${GOPATH}/src/github.com/pawankt/processbeat
git clone https://github.com/pawankt/processbeat ${GOPATH}/src/github.com/pawankt/processbeat
For further development, check out the beat developer guide.
To build the binary for Processbeat run the command below. This will generate a binary in the same directory with the name processbeat.
make build / mage build
To run Processbeat with debugging output enabled, run:
./processbeat -c processbeat.yml -e -d "*"
To test Processbeat, run the following command:
make testsuite
alternatively:
make unit-tests
make system-tests
make integration-tests
make coverage-report
The test coverage is reported in the folder ./build/coverage/
Each beat has a template for the mapping in elasticsearch and a documentation for the fields
which is automatically generated based on fields.yml
by running the following command.
make update
To clean Processbeat source code, run the following command:
make fmt
To clean up the build directory and generated artifacts, run:
make clean
The beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires docker and vendoring as described above. To build packages of your beat, run the following command:
make package
This will fetch and create all images required for the build process. The whole process to finish can take several minutes.
This will create rpm packages incase docker not supports in your environment and not able to run make package.
cd ${GOPATH}/src/github.com/pawankt/processbeat
rpmbuild -ba ~/rpmbuild/SPECS/processbeat.spec (or)
rpmbuild --define '_topdir ${GOPATH}src/github.com/pawankt/processbeat/rpmbuild' -ba processbeat.spec