Metricbeat Custom Module Registration issue

Hello Team,

We are trying to create custom metricbeat module by following the link Creating a Metricset | Beats Developer Guide [master] | Elastic.. but it seems the new module is not getting registered.

We are not getting any log for the custom module from the location ../metricbeat/logs/XXXXXXXX.ndjson file although we have put logs in our metricsets using the go module "github.com/elastic/beats/v7/libbeat/logp" with logp.Info..

We tried to solve the issue by following the link Error running the "metricbeat test modules" command: not registered, module not found and the file present in ../go/src/github.com/beats/metricbeat/mb/example_module_test.go. Referring which we created a ${module}.go file with init and New method also.. Still the issue did not resolved..

My file structure for custom module is as follows:

Where kyndryl.go I have created as a part of debugging referring system.go in system module but other files automatically generated as a part of the command "make create-metricset". I have put info logs in all the module with the logp go module.

Request for your help in this regard.

The output is as follows:

santosh:kyndryl$ tree
.
├── doc.go
├── fields.go
├── ibm
│   ├── ibm.go
│   └── _meta
│       ├── data.json
│       ├── docs.asciidoc
│       └── fields.yml
├── kyndryl.go
└── _meta
    ├── config.yml
    ├── docs.asciidoc
    └── fields.yml

Where kyndryl.go I have created as a part of debugging referring system.go in system module but other files automatically generated as a part of the command "make create-metricset". I have put info logs in all the module with the logp go module.

santosh:metricbeat$ pwd
/home/santosh/go/src/github.com/beats/metricbeat
santosh:metricbeat$ ./metricbeat test modules kyndryl
Error getting metricbeat modules: module initialization error: disabled module

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