# Need advice on creating and collaborating on a new filebeat module

**URL:** <https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 22, 2019, 7:56am UTC](https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448 "2019-03-22T07:56:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JussiV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jussiv/32/42566_2.png) [@JussiV](https://discuss.elastic.co/u/JussiV)\
**Post date:** [March 22, 2019, 7:56am UTC](https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448/1 "2019-03-22T07:56:55Z")

</div>

Hello,

I'm administering a rather old application with multiple servers and we're trying to centralise the the application logs. As the vendor doesn't really provide any support for log centralisation I had the grand idea that lets make it a module and share it with the community in case there is someone else out there with the same issue.

My goal is to collaborate with a colleague of mine to create the module locally and once we're happy with the results, create a pull request for the module. In short, I forked (instead of cloning) the beats repo and from that point on, followed the instructions for creating a new module. All was good until I ran into trouble with the make. This is all described more closely on my [StackOverflow question](https://stackoverflow.com/questions/55137123/collaborating-on-a-new-filebeat-module) on the issue, which sadly has not given me any help.

My questions can be more or less condensed into the following:

1. Can I collaborate with my geographically separated colleague on the module creation if I clone the beats repo, or is forking it the only way to allow us both pushing out changes to our shared repo?
2. If I need to fork the repo, is there some instructions on how to overcome the make issues? (details on the SO question, I assume the issue is because of the forking)

Am I doing things completely backwards, am I missing some obvious git pattern, or is this just a really dumb idea?

-Jussi

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [March 22, 2019, 9:15am UTC](https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448/2 "2019-03-22T09:15:51Z")

</div>

Hi,

The correct way of setting up your development environment is:

- Install the [required Golang version](https://github.com/elastic/beats/blob/master/.go-version). (1.11.5 as of the time of writing this). Consider using [gvm.](https://github.com/andrewkroh/gvm)

- Clone the official Beats repo into $GOPATH/src/github.com/elastic/beats

- Fork the Beats repo into your GitHub account.

- Set up git remotes:

```auto
$ git remote set-url origin git@github.com:<your-github-username>/beats.git
$ git remote add upstream git@github.com:elastic/beats.git

```

- Setup PATH and install `mage`. Inside the beats repo:

```auto
cd vendor/github.com/magefile/mage
go install
set PATH=$PATH:$GOPATH/bin

```

With this you should have a `mage` binary inside $GOPATH/bin that you can invoke from the terminal because it's in your $PATH.

---

<div class="post-metadata">

**Author:** ![JussiV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jussiv/32/42566_2.png) [@JussiV](https://discuss.elastic.co/u/JussiV)\
**Post date:** [March 23, 2019, 12:42pm UTC](https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448/3 "2019-03-23T12:42:34Z")

</div>

Aah, so all my trouble was because I first forked the repo and then cloned it, instead of cloning the elastic beats repo, forking it on GitHub and then just changing the origin of the cloned repo and adding the elastic repo as upstream.

So far it looks better, I didn't get any errors yet. Thank you so much for the help 🙂

---

<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:** [April 20, 2019, 12:42pm UTC](https://discuss.elastic.co/t/need-advice-on-creating-and-collaborating-on-a-new-filebeat-module/173448/4 "2019-04-20T12:42:40Z")

</div>

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