# Please help: Create new beats

**URL:** <https://discuss.elastic.co/t/please-help-create-new-beats/163560>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [January 9, 2019, 3:06pm UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560 "2019-01-09T15:06:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafaelbattesti](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@rafaelbattesti](https://discuss.elastic.co/u/rafaelbattesti)\
**Post date:** [January 9, 2019, 3:06pm UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560/1 "2019-01-09T15:06:19Z")

</div>

Hello elastic community.

I am starting off a project around Beats and trying to first setup my environment.  
I followed the steps on: [https://www.elastic.co/guide/en/beats/devguide/master/new-beat.html](https://www.elastic.co/guide/en/beats/devguide/master/new-beat.html)

But the result was:

```
RAFAELB-MAC:indellient rafaelb$ python $GOPATH/src/github.com/elastic/beats/script/generate.py
Beat Name [Examplebeat]: Awesomebeat
Your Github Name [your-github-name]: rafaelbattesti
Beat Path [github.com/rafaelbattesti/awesomebeat]: github.com/indellient/awesomebeat
Firstname Lastname: Rafael Battesti
RAFAELB-MAC:indellient rafaelb$ cd awesomebeat/
RAFAELB-MAC:awesomebeat rafaelb$ python --version
Python 2.7.10
RAFAELB-MAC:awesomebeat rafaelb$ virtualenv --version
16.2.0
RAFAELB-MAC:awesomebeat rafaelb$ make setup
mkdir -p vendor/github.com/elastic
cp -R /Users/rafaelb/Go/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack
mkdir -p vendor/github.com/magefile
cp -R /Users/rafaelb/Go/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile
git init
Initialized empty Git repository in /Users/rafaelb/Go/src/github.com/indellient/awesomebeat/.git/
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f ./vendor/github.com/elastic/beats/libbeat/scripts/Makefile mage
./vendor/github.com/elastic/beats/libbeat/scripts/Makefile:99: ../dev-tools/make/mage.mk: No such file or directory
make[1]: *** No rule to make target `../dev-tools/make/mage.mk'. Stop.
make: *** [pre-setup] Error 2

```

[EDIT]

```
RAFAELB-MAC:awesomebeat rafaelb$ go version
go version go1.11.2 darwin/amd64
RAFAELB-MAC:awesomebeat rafaelb$ echo $GOPATH
/Users/rafaelb/Go
RAFAELB-MAC:awesomebeat rafaelb$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/rafaelb/DevOpsTools:/Users/rafaelb/Go/bin:/Users/rafaelb/DevOpsTools:/Users/rafaelb/Go/bin
RAFAELB-MAC:awesomebeat rafaelb$

```

Thanks!

---

<div class="post-metadata">

**Author:** ![rafaelbattesti](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@rafaelbattesti](https://discuss.elastic.co/u/rafaelbattesti)\
**Post date:** [January 10, 2019, 12:00am UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560/2 "2019-01-10T00:00:33Z")

</div>

[SOLVED]

1. Manually install magefile  
$ go get [github.com/magefile/mage](http://github.com/magefile/mage)

2. Change path in `github.com/elastic/beats/libbeat/scripts/Makefile:15`

Instead of:  
`ES_BEATS?=..## @community_beat Must be set to ./vendor/github.com/elastic/beats. It must always be a relative path.`

Use:  
`ES_BEATS?=vendor/github.com/elastic/beats## @community_beat Must be set to ./vendor/github.com/elastic/beats. It must always be a relative path.`

Make sure you leave no spaces between `beats` and `##`. This was causing `make setup` to fail such as below.

```
make[1]: *** vendor/github.com/elastic/beats: Is a directory. Stop.
make: *** [pre-setup] Error 2

```

Make implementation:

```
RAFAELB-MAC:awesomebeat rafaelb$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
```

---

<div class="post-metadata">

**Author:** ![blackknight36](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@blackknight36](https://discuss.elastic.co/u/blackknight36)\
**Post date:** [January 16, 2019, 6:54pm UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560/3 "2019-01-16T18:54:50Z")

</div>

It would be nice if the documentation could be updated to address this. Attempting to build a new beat on CentOS 7 fails using the current guide.

---

<div class="post-metadata">

**Author:** ![rafaelbattesti](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@rafaelbattesti](https://discuss.elastic.co/u/rafaelbattesti)\
**Post date:** [January 16, 2019, 10:01pm UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560/4 "2019-01-16T22:01:49Z")

</div>

It's also still failing to `make` the community Beat. I believe there are changes to the code which should be addressed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 14, 2019, 12:01am UTC](https://discuss.elastic.co/t/please-help-create-new-beats/163560/5 "2019-02-14T00:01:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
