Gathering data during the upgrade

The database upgrade process can be very quick but, in some cases, it can also take quite some time. It might be required to keep gathering data even during the Zabbix upgrade, but how can we achieve that if the monitoring doesn't resume until the upgrade is finished?

Remember the additional Zabbix process, the proxy? It's able to gather data and buffer it for sending to the Zabbix server, so no data was lost even if the server was down for some time, which sounds pretty much like our situation. If all of your actual monitoring is already done by Zabbix proxies, you're already on the right track.

If you have items that're polled directly by server, you might want to set up a temporary proxy installation, maybe even on the same server, that would be running during the Zabbix server upgrade and removed later. To do this easily, use the mass update functionality in the Configuration | Hosts section in the frontend and set the Monitored by Proxy option. Make sure the proxy can actually gather data by testing it first with a single host.

Setting up a temporary proxy installation will be notably harder if you're using active items. It would be required to reconfigure all Zabbix agents as they connect to the address specified in the ServerActive parameter. On the other hand, active agents do buffer data for a short while themselves, so a quick server upgrade might not miss that data anyway.

The proxy method sounds great, but it's a bit more complicated than just upgrading the server. Officially, only the same major version is supported for server-proxy compatibility. This means that we should not use proxies of the previous version with our upgraded server. Proxies, if used with a MySQL or PostgreSQL backend, can upgrade their database as well. The suggested path for using proxies to continue data collection through the major version upgrade would be like this:

  1. Block all proxy-server communication (possibly using a local firewall such as iptables)
  2. Stop the old Zabbix server, upgrade it, and start the new server
  1. Stop one of the old Zabbix proxies, upgrade it, and start the new version to upgrade the local database
  2. Restore the communication between the proxy and the new server
  3. Proceed the same way with all the remaining proxies

This should ensure minimum data loss through the upgrade, especially if the steps for an individual proxy upgrade are scripted and happen with no delays.

Proxy database upgrading isn't supported if using SQLite. In that case, the previous method wouldn't work, and the proxy database file should simply be removed when upgrading.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset