Network monitoring on a FreeBSD jail

I want to monitor my local network/homelab, and I am looking for a FreeBSD-based solution, since my infrastructure is FreeBSD, and I would prefer to run it in a jail or if not, then on a single-board computer, like some manner of Pi or the like.

I would like to run on PostgreSQL rather than MySQL (if possible), would prefer it run on nginx over apache.

Things I am not interested in are nagios, don't want a cloud based solution (like netdata) that stores your data in the cloud. I had prometheus/grafana running, but the node exporter on FreeBSD satarted spamming the logs with a sysctl/zfs error every few seconds. I was looking at zabbix, but the the guides I have found online are very old, for zabbix 2/3/4 and FreeBSD 10-12 (circa 2012-2019), and I tried about a year ago to get something running, but could never get it going. There seems to be a lot of moving parts (server, frontend, proxy, agent, and some java component), and I'm still trying to work out what goes where, and how all the pieces fit together.

So is there a guide on setting up Zabbix, specifically under a recent version of FreeBSD? Is there a better alternative for an NMS in 2024?

Thanks!
 
I was looking at zabbix, but the the guides I have found online are very old, for zabbix 2/3/4 and FreeBSD 10-12 (circa 2012-2019),
Just follow the Zabbix documentation. You only need to prepare the database with a few commands (set up a database, username/password for it, etc). The first time Zabbix server starts it'll set up the rest.

There seems to be a lot of moving parts (server, frontend, proxy, agent, and some java component), and I'm still trying to work out what goes where, and how all the pieces fit together.
You don't need the proxy or the java component, those are for specific setups (proxy is to "funnel" multiple hosts on a remote location, the java component is for monitoring java applications). You do need the server with a frontend. And the agent on the various hosts to monitor (including the zabbix host itself). There are multiple components because you can run all of them on separate hosts. The server and the frontend for example don't need to run on the same host. Database can be on another server. In your case I'd probably start with running everything (database, server, frontend) on the same host.
 
Just follow the Zabbix documentation. You only need to prepare the database with a few commands (set up a database, username/password for it, etc). The first time Zabbix server starts it'll set up the rest.

I was kind of confused by the fact that the Zabbix install page only lets you choose between linux distros, and FreeBSD is never mentioned.

You don't need the proxy or the java component, those are for specific setups (proxy is to "funnel" multiple hosts on a remote location, the java component is for monitoring java applications). You do need the server with a frontend. And the agent on the various hosts to monitor (including the zabbix host itself). There are multiple components because you can run all of them on separate hosts. The server and the frontend for example don't need to run on the same host. Database can be on another server. In your case I'd probably start with running everything (database, server, frontend) on the same host.
That is my plan. I've stood up a jail for the purpose, and planned on installing a FreeBSD/Nginx/PostgreSQL/php stack on it, along with timescaledb, and then trying to install the Zabbix server/database/frontend on it. Does that sound like a reasonable approach?
 
I was kind of confused by the fact that the Zabbix install page only lets you choose between linux distros, and FreeBSD is never mentioned.
The difference is mostly irrelevant. Zabbix configuration is exactly the same regardless of the OS it runs on. The only differences might be the exact location of the configuration files and executables. And the packages might be named differently.
 
Back
Top