vector
vector copied to clipboard
Officially list FreeBSD
This issue proposes adding FreeBSD to our OS list on https://vector.dev/docs/setup/installation/operating-systems/ and supporting it through publishing packages.
Add FreeBSD here:

Also: Mention the official packages by @myfreeweb there!
Running curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | sh on FreeBSD should work.
root@freebsd-s-2vcpu-2gb-tor1-01:~ # curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | sh
__ __ __
\ \ / / / /
\ V / / /
\_/ \/
V E C T O R
Installer
--------------------------------------------------------------------------------
Website: https://vector.dev
Docs: https://vector.dev/docs/
Community: https://vector.dev/community/
--------------------------------------------------------------------------------
>>> We'll be installing Vector via a pre-built archive at https://packages.timber.io/vector/latest/
>>> Ready to proceed? (y/n)
>>> y
>>> unsupported arch: x86_64-unknown-freebsd
Ref #732. I'm all for this if we can reliably support it.
@binarylogic I'd like to bundle this in with upgrading our FreeBSD packages in their repos? @myfreeweb maintains it and I'd love to learn the process of upgrading it.
@Hoverbear oh the process is simple: make sure /usr/ports is a git checkout (or at least svn checkout haha), go to /usr/ports/sysutils/vector, edit Makefile (change DISTVERSION, remove PORTREVISION, edit GH_TUPLE to match submodule revisions), run make makesum, run make cargo-crates to generate new CARGO_CRATES, put that into the Makefile instead of the old CARGO_CRATES, try the build with make, try packaging with make package. if everything is good, submit the git diff (or svn diff if you're still using that for some reason) to bugzilla or phabricator, then I approve, then a commiter commits.
Actually I guess it's not that simple unless you've been a maintainer before :D
Noting we can include FreeBSD wasm support now: https://github.com/bytecodealliance/lucet/pull/577.
Really incredible job @myfreeweb :)
What's the current status on this? I'd like to see what I can potentially do to contribute here.
The version in the FreeBSD ports tree looks to be fairly behind. My rust is a bit rusty (heh, sorry), but I'm getting back into it again here soon for a couple of other projects as well.
I did try building from source but ran into some unsurprising build errors, which I have in my notes as follows:
- Build failure caused by the os_info crate dependency of mongodb crate. Bumping from 3.0.2 to 3.0.7 appears to work for moving past that roadblock.
- Current roadblock are multiple build failures due to the src/sources/host_metrics module depending on the heim family of crates for metrics. I'm willing to try my hand at adding feature flag conditionals there to support FreeBSD metrics collection services, though I'd have to do some refresher reading & evaluate existing options first to select the best bang-for-buck approach.
If there's anything going on currently that might impact what I've listed above, I'm all ears :) Don't want to do a bunch of work or nothing or if someone is working on it elsewhere then duplicating the work needlessly.
Yeah, sorry, I haven't been updating the port because I'm not actively using Vector right now. I've been planning to do an update but have lots of other things to do. If anyone would like to take over maintainership, I'll be happy to hand it over.
depending on the heim family of crates for metrics
~~As the author of systemstat, I have a suggestion~~ :D I've looked into porting heim, it looked like a rather tedious job. But really it has to be done eventually…
We could consider packaging Vector without the host_metrics source for FreeBSD until the requisite changes could be made to heim. Briefly looking at https://github.com/unrelentingtech/systemstat, however, it does seem like that could cover Vector's needs from heim though 🤔 I'm curious if @bruceg has thoughts.
Was systemstat one of the ones @bruceg compared when we did host metrics? I can't remember but I presume it'll be in the RFC if we want to see comparisons.
I did look at systemstat briefly when I first wrote host metrics, but ISTR it was missing support for something we wanted at that time. I don't recall exactly what now though.
Indeed, the RFC does mention other alternative crates:
https://github.com/timberio/vector/pull/3581/files#diff-1f4a48456df1b2a20b22c6139776d5f1c9e7b870f18db49b16683acffb732931R29-R38
And points to comparison matrix in heim: https://github.com/heim-rs/heim/blob/master/COMPARISON.md
Heim does support more options, in particular system introspection things like kernel version, but I think the subset of heim functionality we are currently using could possibly be covered by systemstat too.
heim is also the only one to support async operation, which is an important consideration as well.
My plan was to look at what's currently required in that part of the vector source first & then evaluate that list against what's currently offered by both aforementioned crates. Alternatively I was considering generating the bindings and using the native APIs if the list of items required by vector wasn't too big.
@unrelentingtech I hear ya man, I'm the same way. Too much to do, too little time. I doubt I'd be much better at maintaining, but after it's brought up to date, maybe we can figure something out.
@jszwedko That would be great! I could get 0.16.x compiled sans metrics for now at least and start experimenting with the configuration. Once we have the metrics part figured out, enabling it by default should be easy enough (hopefully heh).
@xorander00 did you share your work anywhere by any chance?
@abh No, sorry not yet. I haven't had the time to resume it recently, but I have the project saved in my workspace. I can take a look at it after I'm back from the Holidays and look at putting it online and/or resuming it.
Just noting that I started work on this with #10614 but haven't been able to focus on it recently.
@jszwedko any updates? :)
@jszwedko any updates? :)
Unfortunately nothing on my end. I'd be happy to see someone pick up https://github.com/vectordotdev/vector/pull/10614 if they are motivated though.
We could consider packaging Vector without the
host_metricssource for FreeBSD [..]
We want to use Vector not as metrics collector but as log aggregator, so building it without host_metrics is for us just fine.
How can this be done? Even with --no-default-features, cargo tries to build heim, which still fails on FreeBSD.