-
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
Add support for FreeBSD 32/64bit to Beats and Elastic Agent #1034
Comments
I would like to have this, but I think we need to have proper FreeBSD pkg files. I have already done the work so that the tests run on FreeBSD (see the beats-freebsd job http://build-eu-00.elastic.co/view/Beats/). It looks FreeBSD support is coming soon to FPM which will make building FreeBSD pkg files easier because we won't need FreeBSD to build them. This will fit nicely into the existing package build process which is based entirely on FPM. If you would like to contribute, all of the packaging code is in https://github.com/elastic/beats/tree/master/dev-tools/packer. Basically, it cross-compiles the binaries inside docker then runs FPM to create packages. Once we have this we can start publishing FreeBSD pkg files for download. 😄 |
Just out of curiosity, couldn't it be built on one of the Ubuntu build servers using |
I think providing a 32 and 64-bit tarball would be a great start. pkg files could be added later.
Yes, that is how we cross-compile. That alone works fine for Filebeat, but Packetbeat uses cgo so it will require a C cross-compiler to build from Linux. We do this for windows and mac now, for example, build.sh. |
It looks like FPM now has FreeBSD packaging support. jordansissel/fpm#1073 |
@andrewkroh FreeBSD doesn't require binary packages. Instead we have a "ports" system which builds from source. All that is needed is the correct Makefile which is checked into the FreeBSD svn tree. FreeBSD infrastructure will create binary pkgs for those who want them. Let me know if you need help. I know the FreeBSD ports system well enough, but I've never tried to build beats. I'm still using the logstash system for which there is a FreeBSD port. |
Yes, if we can just integrate with ports we will be all set. Leave the pkg building to the superb FreeBSD infrastructure. |
Might be relevant: #974 (comment) |
beats are in the FreeBSD port collection (stuff that the system would download and compile) and also in the packages (prebuilt binary packages), even if the latter lags a little behind. While I'm writing this, the port is at version Still, it would be nice to have "official" binaries just like they are available for linux. |
FreeBSD ports are definitely lagging (6.4.2 at the moment, jumped from 6.2.4 previously). I'm seeing some errors and it would be nice to know if they were fixed in the latest upstream version. |
Any update on this? 7.x is out, and ports are still stuck on 6.4. Edit: Er...I meant 6.7 |
I am +1 this issue, i'd really like to see a Beats for 7.4 on BSD, would be great to run on a PFsense with suricata, and have that as integration to the SIEM App! |
Agreed. I would also like to see Beats available on FreeBSD/PFsense. |
Meanwhile, there is anyone was able to compile filebeats 7.4.x on freebsd ? |
Is there already someone working on the compile for filebeat 7.4.* for Freebsd? |
You don't necessarily need to run a beat on pfsense to get some of the data in the SIEM app. But yeah, for suricana it look like you should read the local file and for that it would be better to have filebeat run on pfsense.
Then I just copied over the binaries to my pfsense box and replaced the 6.x binaries that I had installed from pgk. For the suricana module, it might be ok to run 7.3 with that module and just ship it to a 7.4 Kibana/Elasticsearch. I haven't tested it, but I think the document structure should be the same and so it might just work with the SIEM app in 7.4. 7.4 fail to compile and errors out with:
But looks like this has been addressed already in 7.5, see #13400 and #13509 |
On a related note: I just had a Twitter discussion with some FreeBSD folks and they would be keen to help out with build and test infrastructures if needed (and our builds work I assume). Best contat is elastic at FreeBSD.org |
I would like to suggest that once we have the development built fine one FreeBSD, is it possible to integrate CI services that supports FreeBSD in this repository? Here are some more information and examples: https://wiki.freebsd.org/HostedCI Please also let me know anything I can help with this. |
Maintain local patches to make something work on FreeBSD is a pain. I really would like to see all of ELK stack tested and built by upstream and not just in FreeBSD ports tree. |
FWIW I successfully built filebeat and metricbeat |
i did too, i also wrote a small guide based on @jakommo instructions in #1034 edit: updated my link due to blog migration |
To add to @jakommo 's install instructions, if you get build errors, it may be because you have a version of go from ports that's out-of-date. I removed the |
Hi, I follow the @jakommo 's install instructions and got the error:
This is v7.6.0 and v7.5.0 too. I very new here and don't know how to fix that. Anyone know solution please share with me. |
Same error as @tientmse62290
the above doesn't work Then I tried to compile llvm from source
I was fedup and thought, might go with Syslog !! |
Hi @tientmse62290 and @getkub I wrote a blogpost about compiling beats for FreeBSD a while back: Just change: |
hi mate |
Cool, did you follow all the instructions, including the vagrant part? |
That's my mistake. I tried to do directly on the freeBSD server (in pfsense). seems they have customised it.
So it all worked perfectly with vagrant . cheers mate |
No problem! Glad it worked! Happy logging! |
@Securitybits-io thanks for you blog article, found it while having this problem myself. So really appreciate. ERROR fileset/modules.go:127 Not loading modules. Module directory not found: /usr/local/sbin/module Although I am handling it in the config file what I got from this article here: What else did you do on your pfsense system to have this filebeat running as a service WORKING ;) ? |
I automated the build of FreeBSD AMD 64bit filebeat binaries for my usecase at work. See https://github.com/omniitgmbh/beats/releases for the output. |
@fadenb you mind sharing that GH Action? |
@slmingol see https://github.com/omniitgmbh/beats/blob/oi-github-actions/.github/workflows/repo-sync.sh and https://github.com/omniitgmbh/beats/blob/oi-github-actions/.github/workflows/go.yml The workflow fails if there is nothing to build. An additional condition should fix that (otherwise you will get a failure notification if there is nothing to build). Feel free to ping me if you have any questions. |
We just shipped a new pfSense integration with Elastic Agent as part of the 7.15 release. It enables easy ingestion of pfSense logs and includes ECS mappings and dashboards. It may be of interest to some folks who have commented in this issue. |
Hello @jamiehynds , Although, how pfSense will send event data to Elastic Cloud without an Elastic Agent available for FreeBSD OS? |
For anyone looking to ship pfSense firewall logs to Elastic Cloud,
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Greetings Elastic Team- Curious if Elastic Agent for FreeBSD is on the roadmap? Thanks for any rough ETA. We love the product!
|
are you using syslog-ng on the linux server, do you have any examples of your setup? |
also curious |
You do not need to run syslog-ng on a linux server, you run Elastic Agent with the PFsense integration (which will listen on a port) and then send the PFsense logs there. For reference, these are the high level steps:
If you can't get it working, please post on the forums https://discuss.elastic.co/c/elastic-stack/elastic-agent/91 and provide details what failed |
Hi! We're labeling this issue as |
Stalebot...by any other name.... Yes, still an issue. |
Yep, still an issue, native agent support for FreeBSD would be helpful |
would be highly useful, i.e. for larger fileservers. we can ship audit logs from there but there would be many more interesting things that aren't possible now. current state;
|
also keen for this - I have some zfs servers I'd like to keep an eye on.. |
This would be awesome. Elastic Agent on FreeBSD would benefit both worlds |
Would it be possible to compile Filebeat for FreeBSD 32-bit and 64-bit along with the rest of the platforms? I know it is easy to compile myself, but adding that to my CI environment and running it on every new release seams redundant. Thank you.
The text was updated successfully, but these errors were encountered: