Getting error while running main function in packetbeat


(Harsha Vardhan) #1

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.


(Harsha Vardhan) #2

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


(ruflin) #3

@harshafrnd4u I assume it is now working as expected?


(Harsha Vardhan) #4

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


(system) #5