Zabbix on NetBSD with IPMI (+ some info of recent changes in pkgsrc)

Finally on -CURRENT branch, and probably carried on to pkgsrc-2020Q4 there is new Zabbix port with version 5.0.6, and now also because openipmi came to pkgsrc (previously only ipmitool was available) can be compiled with IPMI support!

With -current and future branches there is another change coming. As described in this thread: https://mail-index.netbsd.org/pkgsrc-users/2020/12/02/msg032733.html default location for installed packages database is move from /var/db/pkg to /usr/pkg/pkgdb. If you already have (and probably you do if it is not clean install) packages in old place, you can end up with messed locations.

For the reason to not mess up server I chose to stay in default old place. To inform pkgsrc about that you need to put:

PKG_DBDIR=/var/db/pkg into /etc/mk.conf

Back to Zabbix. Default package for 5.0.6 will compile with postgresql support, and without ipmi support.

Depending of your needs you can inform via mk.conf that you want mysql support instead and add ipmi. Simply put this to mk.conf:

PKG_OPTIONS.zabbix50-server=mysql ipmi

After compiling it with these options you will have ipmi support enabled, but not functional yet. One option have to be enabled in zabbix_server.conf

StartIPMIPollers=3

Or less, depend of size of your environment.

Worth to mention that when using proxy, all proxies have to be updated to same version as main server, and if there is IPMI host behind proxy, proxy need to be compiled with option enabling ipmi, and StartIPMIPollers option have to be enabled on zabbix_proxy.conf as well.