[Solved] Filebeat on Raspberry Pi?


(andig) #1

I'm new to ELK and have problems getting started. I got:

  • ELK stack installed on nas via docker
  • filebeat compiled from source on mac via docker image and scp'ed to raspberry
  • beats git cloned to Raspberry

Did it this way because go build did not produce a binary on the raspi (and no error).

Now trying to run filebeat from the beats/filebeat directory on raspi:

2017/12/16 18:17:04.488090 beat.go:635: CRIT Exiting: Error importing Kibana dashboards: fail to import the dashboards in Kibana: Error importing directory /home/pi/beats/filebeat/kibana: No directory /home/pi/beats/filebeat/kibana/default
Exiting: Error importing Kibana dashboards: fail to import the dashboards in Kibana: Error importing directory /home/pi/beats/filebeat/kibana: No directory /home/pi/beats/filebeat/kibana/default
pi@server:~/beats/filebeat $ ls /usr/share/

Indeed this folder does not exist. I assume I'm missing some vital step here, maybe due to the failed build on the actual target machine?

Thanks,
Andreas


(andig) #2

I've managed to compile and run filebeat on raspberry. Please feel free to reply below for an in-depth description how to do this.


(ruflin) #3

@andig I did run beats myself on Raspberry PI in the past and now that we added quite a few "dependency" files it got a bit trickier to have all files included. One trick to make sure having all files is running go build with the right flags for the PI on your machine, use one of the existing tar we ship, replace the binary in there with yours and tar it again. Then you have all the files with the correct paths.


(andig) #4

@ruflin great advise, thank you!

My compile instructions (and a bit more) can be found here: https://gist.github.com/andig/650915e02b18cfe38de6516686977bca


(andig) #5

I've also added a Docker that does the compiling and packaging here: https://github.com/andig/beats4pi


(ruflin) #6

@andig Thanks for sharing this with the community.

One note: I saw you pointed to Golang 1.8. So far this works fine but I think we will start pretty soon to use Go 1.9 feature, so better jump to 1.9 directly :wink:


(andig) #7

Thanks for the hint- will update.


(system) #8

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