Rtbeat processes HTTP POST data from rxtx and publishes events into elasticsearch, logstash, kafka, redis or directly to log files.
- Golang 1.7 or greater.
To clone Rtbeat from the git repository, run the following commands:
mkdir -p ${GOPATH}/src/github.com/txn2/rtbeat
git clone https://github.com/txn2/rtbeat ${GOPATH}/src/github.com/txn2/rtbeat
For further development, check out the beat developer guide.
To build the binary for Rtbeat run the command below. This will generate a binary in the same directory with the name rtbeat.
make
To run Rtbeat with debugging output enabled, run:
./rtbeat -c rtbeat.yml -e -d "*"
To test Rtbeat, 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 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 the rt 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.
rtBeat uses GORELEASER to build binaries and Docker containers.
Install GORELEASER with brew (MacOS):
brew install goreleaser/tap/goreleaser
Build without releasing:
goreleaser --skip-publish --rm-dist --skip-validate
- Commit latest changes
- Tag a version
git tag -a v1.0 -m "Version 1.0"
- Push tag
git push origin v2.0
- Run:
GITHUB_TOKEN=$GITHUB_TOKEN goreleaser --rm-dist