Skip to content

Commit

Permalink
Cleanup the Metricbeat Developer Guide (#1817)
Browse files Browse the repository at this point in the history
* Create MetricSet guide is based on generator
* Simplified guide for module files
* Update Metricbeat dev guide with README linking
  • Loading branch information
ruflin authored and tsg committed Jun 8, 2016
1 parent 37819c7 commit 070b7bc
Show file tree
Hide file tree
Showing 8 changed files with 463 additions and 549 deletions.
51 changes: 51 additions & 0 deletions generate/metricbeat/metricset/README.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
== Create Beat based on Metricbeat

This Metricset beat generator allows to create a beat based on Metricbeat as a library with your
own Metricsets.

[float]
=== Requirements

To create your own beat, it is required that Golang 1.6.2 or later are installed, the `$GOPATH` is setup correctly. In
addition it requires https://www.python.org/downloads/[python] and https://github.com/audreyr/cookiecutter[cookiecutter]
to be installed. More details on how to install cookiecutter can be found http://cookiecutter.readthedocs.io/en/latest/installation.html[here].

[float]
=== Step 1 - Clone Beats repository

The first step is to clone the beats repository:

[source,bash]
----
git clone https://github.com/elastic/beats $GOPATH/src/github.com/elastic/beats
----

After having cloned the beat repository into the `GOPATH`, change to the directory where you want to create the beat.
This is normally under `$GOPATH/src/github.com/{your-jackfan.us.kg}`. Inside this directory run the command:


[float]
=== Step 2 - Create Beat

[source,bash]
----
cookiecutter $GOPATH/src/github.com/elastic/beats/generate/metricbeat/metricset
----

This will ask you some question about the beat name and path. Complete it accordingly.


[float]
=== Step 3 - Init and Create MetricSet

After having created the beat, change into the beat directory and run:

[source,bash]
----
make setup
----

This will do the initial setup for your beat and also run `make create-metricset`, which will ask you for the
module name and metricset name of your beat.

For all further details on creating a metricset, check out the https://www.elastic.co/guide/en/beats/metricbeat/current/_create_a_metricset.html[create a MetricSet] docs.
24 changes: 0 additions & 24 deletions generate/metricbeat/metricset/README.md

This file was deleted.

Loading

0 comments on commit 070b7bc

Please sign in to comment.