運維監控系統Zabbix3.X升級Zabbix 4

1.關閉服務

systemctl stop zabbix-service
systemctl stop httpd

2.更新repo

# cat zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/4.4/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1

3.刷新yum緩存

yum makecache

4.更新zabbixrpm包

yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-proxy-mysql

5.開啓zabbix-service服務

systemctl start zabbix-server.service

6.查看logs

# tail -f /var/log/zabbix/zabbix_server.log
 40651:20200117:090620.296 ODBC:                      YES
 40651:20200117:090620.296 SSH2 support:              YES
 40651:20200117:090620.296 IPv6 support:              YES
 40651:20200117:090620.296 TLS support:               YES
 40651:20200117:090620.296 ******************************
 40651:20200117:090620.296 using configuration file: /etc/zabbix/zabbix_server.conf
 40651:20200117:090620.300 current database version (mandatory/optional): 03040000/03040007
 40651:20200117:090620.300 required mandatory version: 04040000
 40651:20200117:090620.300 starting automatic database upgrade
 40651:20200117:090620.524 completed 0% of database upgrade
 40651:20200117:090711.272 slow query: 50.706882 sec, "alter table `events` add `name` varchar(2048) default '' not null"
 40651:20200117:090711.273 completed 1% of database upgrade
 40651:20200117:090737.112 slow query: 24.320271 sec, "update events set name='Cannot calculate trigger expression.' where source=3 and object=0 and value=1"
 40651:20200117:090737.115 completed 2% of database upgrade
 40651:20200117:090739.151 completed 3% of database upgrade
 40651:20200117:090739.402 completed 4% of database upgrade
 40651:20200117:090739.587 completed 5% of database upgrade
 40651:20200117:090739.741 completed 6% of database upgrade
 40651:20200117:090739.813 completed 7% of database upgrade
 40651:20200117:090739.814 completed 8% of database upgrade
 40651:20200117:090739.859 completed 9% of database upgrade
 40651:20200117:090757.424 slow query: 17.439447 sec, "alter table `alerts` modify `sendto` varchar(1024) default '' not null"
 40651:20200117:090757.424 completed 10% of database upgrade
 40651:20200117:090757.530 completed 11% of database upgrade
 40651:20200117:090757.548 completed 12% of database upgrade
 40651:20200117:090757.561 completed 13% of database upgrade
 40651:20200117:090757.606 completed 14% of database upgrade
 40651:20200117:090757.805 completed 15% of database upgrade
 40651:20200117:090757.854 completed 16% of database upgrade
 40651:20200117:090757.859 completed 17% of database upgrade
 40651:20200117:090803.691 slow query: 3.049138 sec, "alter table `items` add `url` varchar(2048) default '' not null"
 40651:20200117:090806.154 completed 18% of database upgrade
 40651:20200117:090810.992 completed 19% of database upgrade
 40651:20200117:090814.145 slow query: 3.152700 sec, "alter table `items` add `follow_redirects` integer default '1' not null"
 40651:20200117:090817.203 slow query: 3.058451 sec, "alter table `items` add `post_type` integer default '0' not null"

等待數據庫升級完成。

5.解決中文亂碼

ln -fs /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /etc/alternatives/zabbix-web-font

6.解決zabbix4監控oracle11

出現升級後無法監控oracle

Message from 192.168.239.201 is missing header. Message ignored.

升級orabbix,下載地址:https://github.com/106140873/orabbix4zabbix4

conf使用之前的conf文件。

 

 

發佈了161 篇原創文章 · 獲贊 50 · 訪問量 60萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章