Problems with custom beat plugin

Hello!

I'm trying to build a custom output plugin for beats to connect to AWS Kinesis based on 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;

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!

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