Please post all questions and issues first on https://discuss.elastic.co/c/beats before opening a Github Issue.
The Beats are open source and we love to receive contributions from our community — you!
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code for implementing a whole new protocol.
If you have a bugfix or new feature that you would like to contribute, please start by opening a topic on the forums. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.
We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.
The process for contributing to any of the Elastic repositories is similar.
If you want to create a new Beat, please read our developer guide. You don't need to submit the code to this repository. Most new Beats start in their own repository and just make use of the libbeat packages. After you have a working Beat that you'd like to share with others, open a PR to add it to our list of community Beats.
The Beats are Go programs, so install the latest version of golang if you don't have it already. The current Go version used for development is Golang 1.7.6.
The location where you clone is important. Please clone under the source
directory of your GOPATH
. If you don't have GOPATH
already set, you can
simply set it to your home directory (export GOPATH=$HOME
).
$ mkdir -p ${GOPATH}/src/github.com/elastic
$ cd ${GOPATH}/src/github.com/elastic
$ git clone https://github.com/elastic/beats.git
Note: If you have multiple go paths use ${GOPATH%%:*}
instead of ${GOPATH}
.
Then you can compile a particular Beat by using the Makefile. For example, for Packetbeat:
$ cd beats/packetbeat
$ make
Some of the Beats might have extra development requirements, in which case you'll find a CONTRIBUTING.md file in the Beat directory.
The Beats use a variety of scripts based on Python to generate configuration files and documentation. The command used for this is:
$ make update
This command has the following dependencies:
Virtualenv can be installed with the command easy_install virtualenv
or pip install virtualenv
.
More details can be found here.
You can run the whole testsuite with the following command:
$ make testsuite
Running the testsuite has the following requirements:
The documentation for each Beat is located under {beatname}/docs and is based on asciidoc. After changing the docs,
you should verify that the docs are still building to avoid breaking the automated docs build. To build the docs run
make docs
. If you want to preview the docs for a specific Beat, run make docs-preview
inside the folder for the Beat. This will automatically open your browser with the docs for preview.
To manage the vendor/
folder we use
glide, which uses
glide.yaml as a manifest file for the dependencies. Please see
the glide documentation on how to add or update vendored dependencies.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。