WARNING: Version 5.6 of Beats has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Generating Your Beat
editGenerating Your Beat
editTo generate your own Beat, you use the Beat generator available in the beats repo on GitHub. If you haven’t downloaded the Beats source code yet, follow the instructions in Getting Ready.
Before running beat generator, you must decide on a name for your beat. The name should be one word with
the first letter capitalized. In our example, we use Countbeat
.
Now create a directory under $GOPATH for your repository and change to the new directory:
mkdir ${GOPATH}/src/github.com/{user} cd ${GOPATH}/src/github.com/{user}
Run python and specify the path to the Beat generator:
python $GOPATH/src/github.com/elastic/beats/script/generate.py
Python will prompt you to enter information about your Beat. For the project_name
, enter Countbeat
.
For the github_name
, enter your github id. The beat
and beat_path
are set to the correct values automatically (just press Enter to accept each default). For the full_name
, enter your firstname and lastname.
project_name [Examplebeat]: Countbeat github_name [your-github-name]: {username} beat_path [github.com/{github id}]: full_name [Firstname Lastname]: {Full Name}
The Beat generator creates a directory called countbeat
inside of your project folder.
You now have a raw template of the Beat, but you still need to fetch dependencies and set up the Beat.