Forked from anis-campos/cross-compile_filebeat_arm.sh
Last active
May 21, 2025 05:41
-
-
Save lvaylet/68b98f9723196ac324d93ff65f86580b to your computer and use it in GitHub Desktop.
Revisions
-
lvaylet revised this gist
Apr 18, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ GOARCH=arm go build cp filebeat /build exit # ----- Verify the output file ----- # file filebeat #filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped ``` -
lvaylet renamed this gist
Mar 8, 2018 . 1 changed file with 10 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ Elastic does not provide Filebeat binaries for ARMv7. Luckily, Filebeat can easily be cross-compiled with: ```bash # ----- Instantiate an immutable Go container for cross-compilation ----- # mkdir build && cd $_ docker run -it --rm -v `pwd`:/build golang:1.9 /bin/bash @@ -15,9 +16,12 @@ exit # ----- Verify the outputfile ----- # file filebeat #filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped ``` The newly built Filebeat binary can then be uploaded to the remote PCM3, for example with http://transfer.sh On the PCM3: - Download the official 32-bit Linux archive from https://www.elastic.co/downloads/beats/filebeat. Extract the archive and replace the Filebeat binary with the one you cross-compiled and uploaded. - Install Filebeat by following the Mac instructions at https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html - Configure Filebeat as described in the **Using Filebeat** section at https://logz.io/blog/docker-logging/ - Run Filebeat and confirm your logs show up in Kibana at `elk_stack_ip:5601` with a `filebeat-*` index pattern. -
lvaylet revised this gist
Mar 8, 2018 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Elastic does not provide Filebeat binaries for ARMv7. Luckily, Filebeat can easily be cross-compiled with: # ----- Instantiate an immutable Go container for cross-compilation ----- # mkdir build && cd $_ docker run -it --rm -v `pwd`:/build golang:1.9 /bin/bash @@ -13,3 +15,9 @@ exit # ----- Verify the outputfile ----- # file filebeat #filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped # Then the newly built Filebeat binary can be uploaded to the remote PCM3 (for example with http://transfer.sh). # On the PCM3, download the official 32-bit Linux archive from https://www.elastic.co/downloads/beats/filebeat. Extract the archive and replace the Filebeat binary with the one you cross-compiled and uploaded. # Install Filebeat by following the Mac instructions at https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html # Configure Filebeat as described in the **Using Filebeat** section at https://logz.io/blog/docker-logging/ # Run Filebeat and confirm your logs show up in Kibana at `elk_stack_ip:5601` with a `filebeat-*` index pattern. -
lvaylet revised this gist
Mar 6, 2018 . 1 changed file with 10 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,15 @@ # ----- Instantiate an immutable Go container for cross-compilation ----- # mkdir build && cd $_ docker run -it --rm -v `pwd`:/build golang:1.9 /bin/bash # ----- Inside Go container ----- # go get github.com/elastic/beats cd /go/src/github.com/elastic/beats/filebeat/ git checkout v6.2.2 GOARCH=arm go build cp filebeat /build exit # ----- Verify the outputfile ----- # file filebeat #filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped -
anis-campos revised this gist
Oct 21, 2017 . No changes.There are no files selected for viewing
-
anis-campos revised this gist
Oct 21, 2017 . No changes.There are no files selected for viewing
-
anis-campos created this gist
Oct 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #----- Create a Docker for cross-compilation -----# mkdir build && cd $_ docker run -it --rm -v `pwd`:/build golang:1.8.3 /bin/bash #----- Inside docker -----# go get github.com/elastic/beats cd /go/src/github.com/elastic/beats/filebeat/ git checkout v5.6.3 GOARCH=arm go build cp filebeat /build exit #----- Verify the outputfile -----# file filebeat #filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped