Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Upgrading Zabbix from Version 5.0 to 6.0: Comprehensive Migration Guide

Tech May 15 1

Currrent Environment Overview

Our monitoring infrastructure consists of a central Zabbix server with multiple distributed proxies. The specific configuration details are as follows:

  • Zabbix Server: Source installation, version 5.0.12, MySQL 5.7 (source installation)
  • Zabbix Proxies: Installed via Yum, version 5.0.12, MySQL 5.7 (source installation)

Migration Strategy

The migration approach preserves the Zabbix server database while resetting the proxy databases. The high-level migration sequence involves:

  1. Install MySQL 8.0.32 on both Zabbix server and proxy systems
  2. Export the Zabbix server database using mysqldump and import it into the new MySQL 8.0.32 instance
  3. Configure database replication between the original and new server databases
  4. Install Zabbix server 6.0.21 with proper database connection configuration
  5. Initialize proxy databases by installing Zabbix proxy 6.0.21 and configuring database connections
  6. Restart both Zabbix server and proxy services
  7. Upgrade all Zabbix agents to the latest compatible version

Critical Configuration Notes

MySQL User Authentication

When creating the Zabbix user in MySQL 8.0, the authentication method must be explicitly set:

mysql> ALTER USER 'zabbix'@'localhost' IDENTIFIED WITH mysql_native_password BY 'zabbix';

Database Trust Configuration

Before starting the Zabbix server, the database parameter for function creators must be enabled:

mysql> SET GLOBAL log_bin_trust_function_creators = 1;

If upgrade failures occur, execute this command and restart the server. After successful upgrade, revert the setting:

mysql> SET GLOBAL log_bin_trust_function_creators = 0;

Proxy Database Schema

The schema.sql file required for proxy database initialization is located in the source package at database/mysql within the zabbix-6.0.21.tar.gz archive.

Web Interface Update

The Zabbix UI components are found in the ui directory of the zabbix-6.0.21.tar.gz source package. The UI must be updated alongside the server components, as failure to do so may result in incomplete functionality (such as missing alert displays).

Post-Upgrade Configuration

After updating the Zabbix UI, refresh the web interface. The system will present configuration prompts that should be followed sequentially to complete the migrasion.

Post-Migration Considerations

  • Verify the status of all monitored hosts to ensure proper functionality
  • Confirm that the PHP version meets Zabbix 6.0 requirements before initiating the upgrade
  • Evaluate whether the new features in Zabbix 6.0 justify the migration effort for your specific use case

Additional Resources

  • Database creation documentation
  • Source code upgrade procedures
Tags: ZabbixMySQL

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.