Upgrading Zabbix to Version 3.0.1 (from 2.4.7)

This guide modified from 2DayGeek’s post available here.  Some of the steps (namely 7) didn’t work, so I wanted to publish my own step-by-step guide because Zabbix’s provided instructions of build from soure and hope for the best were found lacking in my view.

For your information, this guide is written for upgrading Zabbix 2.4.7 to 3.0.1 on an Ubuntu installation.  The steps will be slightly different for different flavors of Linux/Unix and completely different for Windows.  If you’re doing a Windows Zabbix box you should already know how to manage it because .exe is simpler than this.

  1. Back things up.  I, for example, snapshotted the Zabbix VM before starting.  (Good thing I did too because I messed things up a bunch before I got it right!)
  2. Stop the Zabbix Server process
    1. sudo service zabbix-server stop

  3. (Optional) Manually backup the existing Zabbix database
    1. Note: Optional because of Step 1.  If you didn’t do Step 1, then HIGHLY recommended.
    2. mysqldump -u <dbuser> -p zabbix > zabbixBackup.sql

  4. Backup your configuration files, PHP files, and Zabbix Binaries.
    1. mkdir /tmp/zabbix-backup-2-4-7
      cp /etc/zabbix/zabbix_server.conf /tmp/zabbix-backup-2-4-7
      cp /etc/apache2/conf-enabled/zabbix.conf /tmp/zabbix-backup-2-4-7
      cp /usr/share/doc/zabbix-* /tmp/zabbix-backup-2-4-7

  5. Removed any existing Zabbix Repositories
    1. sudo rm -Rf /etc/apt/sources.list.d/zabbix.repo

  6. Install new Zabbix Repositories
    1. wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-1+trusty_all.deb
      sudo dpkg -i zabbix-release_3.0-1+trusty_all.deb
      sudo apt-get update

  7. Upgrade the Zabbix Packages
    1. sudo apt-get install –only-upgrade zabbix-server-mysql zabbix-agent zabbix-frontend-php

    2. Note: You may need to install zabbix-get, zabbix-java-gateway, zabbix-proxy-mysql, zabbix-sender also.  Also, you may need to switch mysql to pgsql or sqlite depending on your implementation.  I’m using MySql, so this worked for me.
  8. Restart the Zabbix Server
    1. In one console window you should monitor the Zabbix log file.  We want to make sure that on first start the Zabbix Database gets upgraded.
      1. sudo tail -f /var/log/zabbix/zabbix_server.log

    2. In another console window, you start the new Zabbix server.
      1. sudo service zabbix-server start

  9. Let the database upgrade.  It took me about 5 minutes.  It was faster than I expected.  It can take up to 2 hours (reportedly).
  10. Access the new Zabbix instance.
    1. Point your browser to the usual web location.  It should come right up.
  11. (Eventually) Delete your backups/snapshots.

As always, these guides are provided as-is, with no guarantees.  This process worked for me.  It -should- work for others.

4 comments

  1. Thanks for the guide. This worked perfectly for upgrading to 3.2.3. I used the guide to upgrade from v2.2.11 to 3.0.1 with no problems and then proceeded to 3.0.1 to v3.2.3.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.