I've had Zabbix running on PostgreSQL for over a year now it seems, and during that time Zabbix has released a couple major updates, and I've tried to build the newest servers and agents I could on a variety of BSD and Linux flavors. My go-to platform, NetBSD, doesn't have the latest and greatest of every app out there, so I moved on to FreeBSD as the primary Zabbix home base, er at home.
I've had 2 levels of the Zabbix server on NetBSD, once on i386 and once on Arm but for this post I'll ignore those branches and focus on 2 FreeBSD directions for data and applications with the history ramifications.
When I started Zabbix 5 server was the best I could manage; as I tried other variations I had 6.2 up and running eventually. I figure out that exporting and importing history/trends from one Zabbix box to another is simple but time consuming as valuable data feeds increase.
Platform 1: Upgrade database in place; conform to schema changes
In early 2022, I started monitoring with Zabbix en masse, as they say.
-rw-r--r-- 1 root wheel 20385599 Aug 8 2022 postgresql-11.17.tar.bz2
-rw-r--r-- 1 root wheel 22132996 Aug 8 2022 postgresql-14.5.tar.bz2
Starting version (2022):
- Jan 30 21:58:37 freebsd1 pkg-static: postgresql11-server-11.14 installed
Upgrade phases (2023):
- Feb 20 15:46:38 freebsd1 pkg: postgresql11-server-11.17 deinstalled
- Feb 20 16:59:17 freebsd1 pkg-static: postgresql11-server-11.17 installed
- Feb 20 17:14:14 freebsd1 pkg: postgresql11-server-11.17 deinstalled
- Feb 20 17:15:10 freebsd1 pkg-static: postgresql14-server-14.5 installed
|DB type "POSTGRESQL" is not supported by current setup. Possible values MYSQL.|
302137397 Jan 17 03:15 backup_zabbix_history_uint.sql
101438770 Jan 17 03:16 backup_zabbix_trends_uint.sql
Platform 2: New database, import hosts and templates, manually import history.
- Shutdown Zabbix application server
- Run a database export
- Set up target system at least the same database version
- Create database and schema as needed
- Run database import
- Shutdown original database
- Alter Zabbix server configuration
- Viola (ha)
-rw-r--r-- 1 freebsd freebsd 24510838 Jan 31 2022 zabbix-5.4.10.tar.gz
-rw-r--r-- 1 freebsd freebsd 41038757 Dec 5 08:44 zabbix-6.2.6.tar.gz