I am working to create a custom metricset for Metricbeat but am having difficulty with the documentation. I am following the guide here, have installed go, mage, ran go get for the beats repo, am writing the module within my $GOPATH, etc etc.
I have no issues running make create-metricset and can verify that it ends up creating the module within module/{module} as well as a metricset in module/{module}/{metricset}/. The issue is, when it says to run make collect and make (here), I get the error:
make: *** No rule to make target `collect'. Stop.
When looking at the Makefile, it seems like there is no command collect. When I try to run make, I get
Use mage rather than make. Here are the available mage targets:
So instead of using make, I tried doing the following:
mage collectAll
mage build
Now, this works and compiles me a binary that runs metricbeat successfully (./metricbeat -e). However, the module/metricset I created are not recognized:
2020-10-26T14:51:00.604-0400 INFO instance/beat.go:423 metricbeat stopped.
2020-10-26T14:51:00.604-0400 ERROR instance/beat.go:940 Exiting: 1 error: metricset 'metricsd/server' not found
Exiting: 1 error: metricset 'metricsd/server' not found
I was wondering, is this an issue with outdated docs? Is there a new process, or am I missing something here?