This time, we’ll demonstrate how to upgrade Zabbix to the latest version 7.2. The upgrade will be based on Zabbix version 7.0, PHP version 8.0, and PostgreSQL 16 with its TimescaleDB extension.
Guide on how to update PostgreSQL can be found in our wiki article. You will also find instructions for updating TimescaleDB there.
Operating System Selection
The guide includes instructions for RHEL platforms on version 9, where it may only be necessary to adjust the repositories. The guide for Debian is prepared for version 12, which is currently the latest supported version.
Preparation Steps
- Read the “Release Notes” [Official release notes for Zabbix 7.2].
- Carefully review the “Upgrade Notes” document [Official upgrade notes for Zabbix 7.2].
- Check and optimize the current database performance based on the vendor’s recommendations and considering the requirements of the Zabbix instance.
- Verify that the versions of all components align with the compatibility matrix for the new Zabbix version.
- Back up the configuration files for the Zabbix server and Zabbix proxy.
- Back up the Zabbix server database and, if applicable, the Zabbix proxy database.
- Back up all customizations or manual changes made within Zabbix.
- Disable HA (High Availability) on the Zabbix server side.
Version Check
First, verify that the versions of all components on which Zabbix and its parts depend precisely match the official compatibility matrix for Zabbix 7.2. This includes the database, operating system, and any additional modules or extensions. Refer to the official Zabbix documentation for detailed compatibility information.
php-fpm -v
psql -V
Backup of Zabbix Configuration Files
Before proceeding to the next steps, back up all configuration files of the Zabbix server and Zabbix Proxy.
cp -R /etc/zabbix/ /<backup directory>/
cp -R /usr/lib/zabbix/alertscripts/ /<backup directory>/
cp -R /usr/lib/zabbix/externalscripts/ /<backup directory>/
cp -R /usr/share/zabbix/ /<backup directory>/
cp /etc/httpd/conf/httpd.conf /<backup directory>/
cp /etc/httpd/conf.d/zabbix.conf /<backup directory>/
Stopping Services
First, stop the Zabbix server and the web server to ensure that no data is being written to the database.
systemctl stop zabbix-server
systemctl stop httpd
Database Update (Optional)
Please be cautious with the combination of PostgreSQL 17 and TimescaleDB 2.17. This version has issues with loading older data. In case of problems, we recommend one of the following actions:
- Downgrade the extension – Switch to TimescaleDB version 2.16.2.
- Upgrade to TimescaleDB 2.18 – This resolves the issue.
- Use a workaround – Add a parameter to the
postgresql.conf
file to disable vectorization and restart the database.
timescaledb.enable_vectorized_aggregation = off
Detailed instructions for updating PostgreSQL can be found in our wiki.
Zabbix Update
We have successfully backed up all data and updated all related components to match the official compatibility matrix of the new Zabbix version.
Now, we will proceed with updating Zabbix itself and all its components.
First, download the installation packages for the repositories of the new Zabbix version and clear the installation cache:
rpm -Uvh https://repo.zabbix.com/zabbix/7.2/release/rocky/9/noarch/zabbix-release-latest-7.2.el9.noarch.rpm
dnf clean all
After this step, the repositories for the new version are available, allowing us to update all other Zabbix components, including sequentially updating all Zabbix Proxies.
dnf update zabbix-* -y
After successfully completing the update of Zabbix server packages and all its components, we can restart Zabbix to finalize the database structure upgrade.
systemctl start zabbix-server.service
The step-by-step activities and the entire update process, including any modifications to the database schema structure, can be monitored in the Zabbix server log file:
tail -f /var/log/zabbix/zabbix_server.log
After successfully completing the database structure upgrade, we can restart our web server. This can be done with the following command:
systemctl start httpd
Backup of Zabbix Configuration Files
Before proceeding to the next steps, back up all configuration files of the Zabbix server and Zabbix Proxy.
cp -R /etc/zabbix/ /<backup directory>/
cp -R /usr/lib/zabbix/alertscripts/ /<backup directory>/
cp -R /usr/lib/zabbix/externalscripts/ /<backup directory>/
cp -R /usr/share/zabbix/ /<backup directory>/
cp -R /etc/apache2/ /<backup directory>/
Stopping Services
First, stop the Zabbix server and the web server to ensure that no data is being written to the database.
systemctl stop zabbix-server
systemctl stop apache2
Database Update (Optional)
Please be cautious with the combination of PostgreSQL 17 and TimescaleDB 2.7. This version has issues with loading older data. In case of problems, we recommend one of the following actions:
- Downgrade the extension – Switch to TimescaleDB version 2.16.2.
- Upgrade to TimescaleDB 2.8 – This resolves the issue.
- Use a workaround – Add a parameter to the
postgresql.conf
file to disable vectorization and restart the database.
timescaledb.enable_vectorized_aggregation = off
Detailed instructions for updating PostgreSQL can be found in our wiki.
Zabbix Update
We have successfully backed up all data and updated all related components to match the official compatibility matrix of the new Zabbix version.
Now, we will proceed with updating Zabbix itself and all its components.
First, download the installation packages for the repositories of the new Zabbix version and clear the installation cache:
wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb
dpkg -i zabbix-release_latest_7.2+debian12_all.deb
After this step, the repositories for the new version are available, allowing us to update all other Zabbix components, including sequentially updating all Zabbix Proxies.
apt update
apt install --only-upgrade $(dpkg -l | grep zabbix | awk '{print $2}')
After successfully completing the update of Zabbix server packages and all its components, we can restart Zabbix to finalize the database structure upgrade.
systemctl start zabbix-server.service
The step-by-step activities and the entire update process, including any modifications to the database schema structure, can be monitored in the Zabbix server log file:
tail -f /var/log/zabbix/zabbix_server.log
After successfully completing the database structure upgrade, we can restart our web server. This can be done with the following command:
systemctl start apache2
Finishing Tasks
- Verify that the Zabbix server and database server are running correctly and have the correct versions.
- Also, check if the following error appears in the system during the startup of the server or proxy:
...the user limit of 1024 file descriptors is insufficient. The maximum number of concurrent checks per worker has been reduced...
Instructions for resolving this issue can be found in our wiki. - Ensure that all Zabbix proxies are running and have the correct versions. Backward compatibility (partial) is provided for version 7.0. However, we strongly recommend using the same version as the Zabbix server. Older versions are not supported.
- Check the status of the Zabbix server and Zabbix proxies (log files, unsupported items, queues, monitoring scripts, etc.).
- Verify that your servers are assigned the latest versions of official Zabbix templates. [Zabbix GIT]
What’s New in Zabbix 7.2
You can find information about what’s new in Zabbix 7.2 in our article, or you can watch our webinar, which focuses specifically on these updates.
And that’s it! You can now start using your newly updated Zabbix version 7.2 with all its fixes and new features.
Give us a Like, share us, or follow us 😍
So you don’t miss anything: