Creating beat from Metricbeat


I'm trying to create a beat based on Metricbeat.

I have followed the steps described in

After doing make update command, the file examplebeat.yml was created (examplebeat is the name of my beat) but when i run the beat (after make command) i get the error:

Exiting: error loading config file: stat beat.yml: no such file or directory

Why the beat tried load beat.yml file and not examplebeat.yml?

Another question:

if I rename examplebeat.yml to beat.yml, I get another error:
Exiting: one or more modules must be configured

Can you help me?

Fabio Santos

Is your code somewhere on a public repo so I could have a quick look?

Hi Ruflin,

Thanks for the answer.

This is my code:

I add a new file with all commands I ran commands

Fábio Santos

One think I spotted is that your main.go file looks a bit different then the one from auditbeat (which is also a metricbeat based Beat): Perhaps you can adjust this part and get a cmd file into place?

Hi @ruflin,

Thanks for help.

I did changes, but I still got errors.

cmd/root.go:49:45: cannot use runFlags (type *"".FlagSet) as type *"".FlagSet in argument to cmd.GenRootCmdWithRunFlags
cmd/root.go:50:20: cannot use ShowCmd (type *"".Command) as type *"".Command in argument to RootCmd.Command.AddCommand

But I didn't understand. The main.go file and all files were created by following the steps from the documentation.

Why i need change them?

Fábio Santos

Hi again,

I'm really struggling here.

I created a new fresh beat based on metricbeat :

I can't understand my problems.

I followed this documentation :

[root@elk-ingress vspherebeat]# ./vspherebeat 
Exiting: error loading config file: stat beat.yml: no such file or directory
[root@elk-ingress vspherebeat]# 

Why the beat look to beat.yml file and not vspherebeat.yml?

The file vspherebeat.yml exists and was created by the command:

make update

I really apreciate any help.

Fabio Santos

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