Getting error while running main function in packetbeat

I am trying to build packetbeat from sources, and I tried running using command
"go run main.go -c packetbeat.yml"

It gives error
Exiting: error initializing publisher: Error loading template /tmp/go-build318793343/command-line-arguments/_obj/exe/packetbeat.template.json: open /tmp/go-build318793343/command-line-arguments/_obj/exe/packetbeat.template.json: no such file or directory
exit status 1

Some background
Installed go language, configured env variables. Ran commands
"make"
"make update"
and then I ran command "go run main.go -c packetbeat.yml" and then it started giving above exception.

I came to know after reading makefile that I need to run packetbeat executable generated from "make build".

1 Like

@harshafrnd4u I assume it is now working as expected?

Yes ruflin it is working now, may be it would be good if you could add build process to documentation . It would help a newbie for go language and packetbeat like me. I actually went through makefile to understand the process.

Thanks @ruflin