-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: MIPS support for packetbeat #4522
Comments
This would be super useful for my networking kit (at home). If anyone else comes across this, I have been compiling file+metricbeat for MIPS64 via https://github.com/caglar10ur/elk-usg. |
Any chance for this? Other beats are working but most useful for routers and other network gear can not be compiled because of failed constraints:
|
Related: #7388 That PR provides a way to build Packetbeat for mips, mipsle, mips64, and mips64le (among other arches). It has some snapshots builds linked for testing purposes. See https://github.com/elastic/beats/files/2122012/snapshot-urls.txt (temporary). |
Tested + working on MIPSLE |
Can't seem to get it to work on mips64. |
@andrewkroh I tried running one of the precompiled builds and it just fails with "cannot run executable". |
@jamesspi I wonder if it's an issue with the architecture of the binary. "mips64" in Go is a big-endian. The binary is dynamically linked due to the use of cgo so it expects a 64-bit userspace (some mips machines have 64-bit kernels but have 32-bit userspace).
So I'd check a few things:
|
Hey @andrewkroh , sorry I haven't gotten back to you, been on the road. I'll give this a go and let you know - thanks a mill. |
Hey @andrewkroh , here is the output:
file isn't available on the OS. Thanks! |
@jamesspi What about the user-space setup? Check the "Architecture" column in |
@andrewkroh - Bingo, that worked. Thanks a mill! |
It'd be awesome to widen this enhancement to include all of our beats for MIPS* :) |
Hi @jamesspi, it's been a while, but do you remember where you found the 32-bit mips files? I can't find them:( Thanks! |
Hi @slackware666 - Try following this guide to compile in mips :) https://github.com/caglar10ur/elk-usg/ |
A mips package can be produced directly from the beats packaging build provided you have Go and Docker setup.
|
Hi @andrewkroh |
I changed $ go version
go version go1.12.9 darwin/amd64
$ cd $GOPATH/src/github.com/elastic/beats/packetbeat
$ git checkout v7.3.2
HEAD is now at 5b046c5a9 [7.3] Fix typos + add CHANGELOG (#13481) (#13510)
$ PLATFORMS="+all linux/mips" make release
2019/09/27 00:43:59 Found Elastic Beats dir at /Users/akroh/go/src/github.com/elastic/beats
Generated fields.yml for packetbeat to /Users/akroh/go/src/github.com/elastic/beats/packetbeat/fields.yml
No fields files for module applayer
No fields files for module tcp
No fields files for module udp
Generated fields.yml for packetbeat to /Users/akroh/go/src/github.com/elastic/beats/packetbeat/fields.yml
>> Building packetbeat.yml for linux/amd64
>> Building packetbeat.reference.yml for linux/amd64
>> Building packetbeat.docker.yml for linux/amd64
2019/09/27 00:44:01 Found Elastic Beats dir at /Users/akroh/go/src/github.com/elastic/beats
>> buildGoDaemon: Building for linux/mips
>> golangCrossBuild: Building for linux/mips
>> golangCrossBuild: Building for linux/mips
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=mips-linux-gnu-gcc, CXX=mips-linux-gnu-g++, GOARCH=mips, GOARM=, GOOS=linux, PLATFORM_ID=linux-mips]
>> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=mips-linux-gnu-gcc, CXX=mips-linux-gnu-g++, GOARCH=mips, GOARM=, GOOS=linux, PLATFORM_ID=linux-mips]
2019/09/27 04:44:04 Found Elastic Beats dir at /go/src/github.com/elastic/beats
2019/09/27 04:44:04 Found Elastic Beats dir at /go/src/github.com/elastic/beats
>> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=mips-linux-gnu-gcc, CXX=mips-linux-gnu-g++, GOARCH=mips, GOARM=, GOOS=linux, PLATFORM_ID=linux-mips]
2019/09/27 04:44:05 Found Elastic Beats dir at /go/src/github.com/elastic/beats
/tmp/ccpnThjx.o: In function `main':
god.c:(.text+0x494): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
god.c:(.text+0x3dc): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
configure: WARNING: using cross tools not prefixed with host triplet
configure: WARNING: using cross tools not prefixed with host triplet
grammar.y: warning: 38 shift/reduce conflicts [-Wconflicts-sr]
grammar.y: warning: 38 shift/reduce conflicts [-Wconflicts-sr]
Updated 1 path from the index
Updated 0 paths from the index
>> Building build/package/packetbeat-oss-linux-mips.tar.gz/packetbeat.reference.yml for linux/mips
>> Building build/package/packetbeat-oss-linux-mips.tar.gz/packetbeat.yml for linux/mips
>> Building build/package/packetbeat-oss-linux-mips.deb/packetbeat.yml for linux/mips
>> Building build/package/packetbeat-oss-linux-mips.deb/packetbeat.reference.yml for linux/mips
>> Building build/package/packetbeat-linux-mips.tar.gz/packetbeat.reference.yml for linux/mips
>> Building build/package/packetbeat-linux-mips.tar.gz/packetbeat.yml for linux/mips
>> Building build/package/packetbeat-linux-mips.deb/packetbeat.reference.yml for linux/mips
>> Building build/package/packetbeat-linux-mips.deb/packetbeat.yml for linux/mips
>> package: Building packetbeat type=deb for platform=linux/mips
>> package: Building packetbeat-oss type=tar.gz for platform=linux/mips
>> package: Building packetbeat type=tar.gz for platform=linux/mips
>> package: Building packetbeat-oss type=deb for platform=linux/mips
>> Testing package contents
package ran for 1m36.620261484s
$ ls -la build/distributions/
total 147640
drwxr-xr-x 10 akroh staff 320 Sep 27 00:45 .
drwxr-xr-x 10 akroh staff 320 Sep 27 00:45 ..
-rw-r--r-- 1 akroh staff 18303585 Sep 27 00:45 packetbeat-7.3.2-linux-mips.tar.gz
-rw-r--r-- 1 akroh staff 164 Sep 27 00:45 packetbeat-7.3.2-linux-mips.tar.gz.sha512
-rw-r--r--@ 1 akroh staff 18819164 Sep 27 00:45 packetbeat-7.3.2-mips.deb
-rw-r--r-- 1 akroh staff 155 Sep 27 00:45 packetbeat-7.3.2-mips.deb.sha512
-rw-r--r-- 1 akroh staff 18179865 Sep 27 00:45 packetbeat-oss-7.3.2-linux-mips.tar.gz
-rw-r--r-- 1 akroh staff 168 Sep 27 00:45 packetbeat-oss-7.3.2-linux-mips.tar.gz.sha512
-rw-r--r--@ 1 akroh staff 18692984 Sep 27 00:45 packetbeat-oss-7.3.2-mips.deb
-rw-r--r-- 1 akroh staff 159 Sep 27 00:45 packetbeat-oss-7.3.2-mips.deb.sha512 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue doesn't have a |
As an administrator, I run many different chip architectures. The currently support for
arm64
with Packetbeat is fantastic, but I would be over the moon if Packetbeat would run on MIPS/MIPS64. The reason for this is allowing Packetbeat to execute directly on some of my routers for traffic introspection.For reference:
File under request for enhancement.
The text was updated successfully, but these errors were encountered: