# Problems with custom beat plugin

**URL:** <https://discuss.elastic.co/t/problems-with-custom-beat-plugin/231389>\
**Category:** Beats\
**Created:** [May 6, 2020, 6:23pm UTC](https://discuss.elastic.co/t/problems-with-custom-beat-plugin/231389 "2020-05-06T18:23:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_Swanson](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@Cody\_Swanson](https://discuss.elastic.co/u/Cody_Swanson)\
**Post date:** [May 6, 2020, 6:23pm UTC](https://discuss.elastic.co/t/problems-with-custom-beat-plugin/231389/1 "2020-05-06T18:23:49Z")

</div>

Hello!

I'm trying to build a custom output plugin for beats to connect to AWS Kinesis based on [https://github.com/s12v/awsbeats](https://github.com/s12v/awsbeats). With this plugin, I'm trying to use go modules via a new go.mod file in the root of the plugin repository, but I can't get the module to build with the command 'go build -buildmode=plugin'. The error is `go: github.com/elastic/beats/v7@v7.6.2: missing github.com/elastic/beats/go.mod and .../v7/go.mod at revision v7.6.2`.

The go.mod file I'm attempting to use;

```auto
module gitlab.com/[REDACTED]

go 1.13

require (
        github.com/aws/aws-sdk-go v1.30.21
        github.com/elastic/beats/v7 v7.6.2
        github.com/fatih/color v1.5.0
        github.com/gofrs/uuid v3.2.0+incompatible
        github.com/mattn/go-colorable v0.0.8
        github.com/mattn/go-isatty v0.0.2 // indirect
        github.com/pkg/errors v0.9.1
        github.com/prometheus/procfs v0.0.11
        github.com/rs/xid v1.2.1
        go.elastic.co/ecszap v0.1.1-0.20200424093508-cdd95a104193
        gopkg.in/yaml.v2 v2.2.8
)

```

I've also tried replacing `github.com/elastic/beats/v7 v7.6.2` with `github.com/elastic/beats v7.6.2` and my custom plugin will compile fine, but when I attempt adding the plugin to filebeat with this command `./filebeat --plugin kinesis.so -v` I get the following output;`./filebeat flag redefined: strict.perms` which is not being redefined in the new plugin.

So I guess TLDR:

1. Unable to compile custom plugin with `github.com/elastic/beats/v7 v7.6.2` error: `go: github.com/elastic/beats/v7@v7.6.2: missing github.com/elastic/beats/go.mod and .../v7/go.mod at revision v7.6.2` but able to compile with `github.com/elastic/beats v7.6.2`
2. When compiling with `github.com/elastic/beats v7.6.2`, error running via `./filebeat --plugin kinesis.so -v` error: `./filebeat flag redefined: strict.perms`

Any help is appreciated!

---

<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:** [June 3, 2020, 8:23pm UTC](https://discuss.elastic.co/t/problems-with-custom-beat-plugin/231389/2 "2020-06-03T20:23:49Z")

</div>

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