ncabatoff / process-exporter

Prometheus exporter that mines /proc to report on selected processes
MIT License
1.71k stars 269 forks source link

FreeBSD support #241

Open glensc opened 2 years ago

glensc commented 2 years ago

I know go can easily cross-compile to freebsd, but does the software know how to process process data on freebsd?

mdschmitt commented 2 years ago

No.

This software essentially crawls Linux's /proc filesystem, which does not exist on FreeBSD. You'd need to rewrite process_exporter to utilize the contents of FreeBSD's sysctl and procstat utilities. It's probably doable, but I don't believe any effort has been put toward that goal.

You might be able to cheat and try doing a mount -t procfs proc /proc on FreeBSD and run process_exporter to see what happens, but that's definitely undocumented and not-officially-supported territory. FreeBSD disables procfs by default, and you probably shouldn't add a dependency for yourself on deprecated functionality.