Upgrade Zabbix
Description
Warning
I never recommend updating Zabbix. Everybody's experience is different.
If your current Zabbix infrastructure is already working, then there is no need to update it.
If you really want the latest version, then install a clean version of Zabbix on a brand new server and then transition your agents one by one to the new server, solving each new problem you experience in order.
For latest documentation about upgrading, visit https://www.zabbix.com/documentation/current/en/manual/installation/upgrade/packages
Below are my notes, but are not guaranteed to work for you.
When viewing the Zabbix dashboard, you may see the message "Zabbix Server version : New Version available"
At your own risk, you can upgrade the Zabbix components.
If using a cloud provider, such as Digital Ocean, you can create a snapshot of your droplet/server that you can restore from in case of any major issues during the upgrade.
You may also have a different backup policy that you should follow.
Note that upgrading may create more problems than it fixes. My personal approach to this problem, is to install a new version of Zabbix on a new server and then transfer only the customisations and configurations that I still need over to my new Zabbix server.
Stop services
SSH onto your Zabbix server, and/or hosts that you want to upgrade and stop the relevant services.
# # # |
|
Upgrade MySQL
If using MySQL on your Zabbix server, then you can upgrade it also.
apt update
apt upgrade mysql-server
Upgrade Zabbix components
Download the latest Zabbix repository for your operating system and install the package.
# # |
|
Upgrade each component.
# |
|
Or you can upgrade only one component, such as a Zabbix Agent on one of your hosts.
# |
|
Reboot server/host.
# |
|
After reboot, your MySQL and Zabbix processes should auto start. If not,
# # # |
|
And check that their statuses are ok.
Note that the above commands relate to my operating system and Zabbix setup. The above commands are likely to change depending on which version of Zabbix is now the latest. Always refer to the official Zabbix download page.
Troubleshooting
Database error : The Zabbix database version does not match current requirements.
After rebooting, you see an error similar to,
Your database version: 7000000. Required version: 7020000.
Please contact your system administrator.
After upgrading, the database connection properties may have been reset to defaults in the configuration file.
Ensure that the settings are correct for these options.
DBName
DBUser
DBPassword