Changes

From SME Server
Jump to navigationJump to search
1,832 bytes added ,  09:34, 11 December 2022
Line 289: Line 289:     
*'''Template_icmp''': will configure two items to check if the server is alive, and measure the latency. It also provides latency graphs and some triggers (if latency is too high, if host is down since more than 5min and if hosts is down for more than 1 hour)
 
*'''Template_icmp''': will configure two items to check if the server is alive, and measure the latency. It also provides latency graphs and some triggers (if latency is too high, if host is down since more than 5min and if hosts is down for more than 1 hour)
 +
 +
=== Upgrading 4.4 to 5.0 ===
 +
see this page https://www.zabbix.com/documentation/5.0/en/manual/installation/upgrade_notes_500. Mostly you will need to
 +
 +
* migrate your db from mariadb 5.5 to mariadb 10.5 with its user
 +
* fix the  row format to dynamic
 +
* install 5.0 using rpms
 +
* fix the table with database/mysql/double.sql
 +
<syntaxhighlight lang="mysql">
 +
USE zabbixdb;
 +
alter table hosts row_format = dynamic;
 +
ALTER TABLE trends
 +
MODIFY value_min DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
 +
MODIFY value_avg DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
 +
MODIFY value_max DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
 +
ALTER TABLE history MODIFY value DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
 +
</syntaxhighlight>
 +
 +
=== Migrate DB from mariadb 5.5. to mariadb 10.5 ===
 +
The script will check if zabbixdb is present in mariadb 5.5. path, as long as it is it will keep using this db, even if one is present in mariadb 10.5.<syntaxhighlight lang="bash">
 +
# need testing, writing inspired from Nextcloud contrib page
 +
mysqldump `config getprop zabbix-server DbName` > zabbixdb.sql
 +
echo "CREATE DATABASE IF NOT EXISTS `config getprop zabbix-server DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"| mysql105
 +
mysql105 `config getprop zabbix-server DbName`< zabbixdb.sql
 +
 +
echo "CREATE USER IF NOT EXISTS `config getprop zabbix-server DbUser`@localhost IDENTIFIED BY '`config getprop zabbix-server DbPassword`';"| mysql105
 +
echo "GRANT ALL PRIVILEGES ON `config getprop zabbix-server DbName`.* TO `config getprop zabbix-server DbUser`@localhost; FLUSH PRIVILEGES;" | mysql105
 +
 +
echo "drop database `config getprop zabbix-server DbName`;" |mysql
 +
signal-event smeserver-zabbix-server-update
 +
</syntaxhighlight>{{Warning box|These lines of code need to be tested first, try on a test environment and be prepared to restore a backup of your db.}}
    
=== Bugs ===
 
=== Bugs ===
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,240

edits

Navigation menu