Skip to main content

Zabbix 2.4 upgrade from patched 2.2.x

·2 mins

If you patched your Zabbix 2.2.x server to support HTTP headers and SSL stuff and you want to upgrade to official Zabbix 2.4 without loosing previos work, you should do the following:

Important: All the queries are written using MySQL syntax so you will have to adapt them if you use another database server

  1. Stop the Zabbix Server
  2. Rename the conflicting column in the database:
ALTER TABLE httpstep CHANGE COLUMN headers headers_2_2_x text NOT NULL;
  1. Do the normal upgrade to Zabbix 2.4.0. Once the database upgrade has been completed stop the Zabbix Server again.
  2. Now we will drop the new created columns and we will rename 2.2.x related columns to the new names:
ALTER TABLE httptest DROP COLUMN `capath`;
ALTER TABLE httptest DROP COLUMN `ssl_cert_file`;
ALTER TABLE httptest DROP COLUMN `ssl_key_file`;
ALTER TABLE httptest DROP COLUMN `ssl_key_password`;
ALTER TABLE httptest DROP COLUMN `verify_peer`;
ALTER TABLE httptest DROP COLUMN `verify_host`;
ALTER TABLE httpstep DROP COLUMN `headers`;

ALTER TABLE httpstep CHANGE COLUMN `headers_2_2_x` `headers` text NOT NULL;
ALTER TABLE httptest CHANGE COLUMN `certfile` `ssl_cert_file` varchar(255) DEFAULT '' NOT NULL;
ALTER TABLE httptest CHANGE COLUMN `keyfile` `ssl_key_file` varchar(255) DEFAULT '' NOT NULL;
ALTER TABLE httptest CHANGE COLUMN `keypass` `ssl_key_password` varchar(64) DEFAULT '' NOT NULL;
ALTER TABLE httptest CHANGE COLUMN `verifypeer` `verify_peer` integer(11) DEFAULT '0' NOT NULL;
ALTER TABLE httptest CHANGE COLUMN `verifyhost` `verify_host` integer(11) DEFAULT '0' NOT NULL;
  1. Be sure you have defined SSLCertLocation SSLKeyLocation and SSLCALocation in zabbix_server.conf.
  2. Update your web scenario configurations. No more absolute paths as SSL files are now relative to SSL{Cert,Key}Location variables.
  3. Start your Zabbix server.
  4. Enjoy!.