Zabbix快速升级

2023年 7月 15日 104.1k 0

以yum安装为例,直接卸载后重新安装即可,如果存在proxy层,也需要更新

停止服务

[root@DS-VM-Node114 ~]# systemctl stop zabbix-server.service 
[root@DS-VM-Node114 ~]# systemctl stop zabbix-agent.service 

[root@DS-VM-Node114 ~]# rpm -qa zabbix-server-mysql
zabbix-server-mysql-3.2.6-1.el7.x86_64
[root@DS-VM-Node114 ~]# rpm -qa zabbix-web-mysql
zabbix-web-mysql-3.2.6-1.el7.noarch
[root@DS-VM-Node114 ~]# rpm -qa zabbix-release
zabbix-release-3.2-1.el7.noarch

卸载前进行配置备份

[root@DS-VM-Node114 ~]# mkdir /bak && cp -r /etc/zabbix/* /bak

开始卸载

[root@DS-VM-Node114 ~]# yum remove zabbix-release-3.2-1.el7.noarch zabbix-web-mysql-3.2.6-1.el7.noarch zabbix-server-mysql-3.2.6-1.el7.x86_64 zabbix-agent.x86_64 zabbix-get.x86_64 

下载安装包

http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/

[root@DS-VM-Node114 ~]# rpm -vih http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
获取http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
准备中...                          ################################# [100%]
正在升级/安装...
   1:zabbix-release-3.4-2.el7         ################################# [100%]

开始安装

[root@DS-VM-Node114 ~]# yum install zabbix-web-mysql zabbix-server-mysql zabbix-agent zabbix-get -y

相比较之前的,多出一个 zabbix-web.noarch 0:3.4.5-1.el7

将配置文件复位

[root@DS-VM-Node114 /etc/zabbix]# mv zabbix_server.conf zabbix_server.conf.bak
[root@DS-VM-Node114 /etc/zabbix]# mv zabbix_server.conf.rpmsave zabbix_server.conf

[root@DS-VM-Node114 /etc/zabbix]# mv zabbix_agentd.conf zabbix_agentd.conf.3.4
[root@DS-VM-Node114 /etc/zabbix]# mv zabbix_agentd.conf.rpmsave zabbix_agentd.conf
systemctl start zabbix-server.service 

启动

启动即可,启动的同时看观察日志有update的日志

 27104:20180108:143513.438 Starting Zabbix Server. Zabbix 3.4.5 (revision 76340).
 27104:20180108:143513.438 ****** Enabled features ******
 27104:20180108:143513.438 SNMP monitoring:           YES
 27104:20180108:143513.438 IPMI monitoring:           YES
 27104:20180108:143513.438 Web monitoring:            YES
 27104:20180108:143513.438 VMware monitoring:         YES
 27104:20180108:143513.438 SMTP authentication:       YES
 27104:20180108:143513.438 Jabber notifications:      YES
 27104:20180108:143513.438 Ez Texting notifications:  YES
 27104:20180108:143513.438 ODBC:                      YES
 27104:20180108:143513.438 SSH2 support:              YES
 27104:20180108:143513.438 IPv6 support:              YES
 27104:20180108:143513.438 TLS support:               YES
 27104:20180108:143513.438 ******************************
 27104:20180108:143513.438 using configuration file: /etc/zabbix/zabbix_server.conf
 27104:20180108:143513.448 current database version (mandatory/optional): 03040000/03040005
 27104:20180108:143513.449 required mandatory version: 03040000
 27104:20180108:143513.461 slow query: 0.006521 sec, "select i.itemid,i.hostid,i.status,i.type,i.value_type,i.key_,i.snmp_community,i.snmp_oid,i.port,i.snmpv3_securityname,i.snmpv3_securitylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassphrase,i.ipmi_sensor,i.delay,i.trapper_hosts,i.logtimefmt,i.params,i.state,i.authtype,i.username,i.password,i.publickey,i.privatekey,i.flags,i.interfaceid,i.snmpv3_authprotocol,i.snmpv3_privprotocol,i.snmpv3_contextname,i.lastlogsize,i.mtime,i.history,i.trends,i.inventory_link,i.valuemapid,i.units,i.error,i.jmx_endpoint,i.master_itemid from items i,hosts h where i.hostid=h.hostid and h.status in (0,1) and i.flags<>2"
 27104:20180108:143513.465 slow query: 0.004410 sec, "select pp.item_preprocid,pp.itemid,pp.type,pp.params,pp.step from item_preproc pp,items i,hosts h where pp.itemid=i.itemid and i.hostid=h.hostid and h.status in (0,1) and i.flags<>2 order by pp.itemid"
 27104:20180108:143513.477 slow query: 0.005493 sec, "select i.itemid,f.functionid,f.function,f.parameter,t.triggerid from hosts h,items i,functions f,triggers t where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and h.status in (0,1) and t.flags<>2"
 27104:20180108:143513.491 slow query: 0.013620 sec, "select distinct t.triggerid,t.description,t.expression,t.error,t.priority,t.type,t.value,t.state,t.lastchange,t.status,t.recovery_mode,t.recovery_expression,t.correlation_mode,t.correlation_tag from hosts h,items i,functions f,triggers t where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid and h.status in (0,1) and t.flags<>2"
 27104:20180108:143513.496 slow query: 0.004696 sec, "select distinct d.triggerid_down,d.triggerid_up from trigger_depends d,triggers t,hosts h,items i,functions f where t.triggerid=d.triggerid_down and t.flags<>2 and h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=d.triggerid_down and h.status in (0,1)"
 27104:20180108:143513.502 server #0 started [main process]
 27126:20180108:143513.503 server #1 started [configuration syncer #1]
 27127:20180108:143513.503 server #2 started [alerter #1]
 27128:20180108:143513.503 server #3 started [alerter #2]
 27129:20180108:143513.504 server #4 started [alerter #3]
 27130:20180108:143513.504 server #5 started [housekeeper #1]
 27131:20180108:143513.504 server #6 started [timer #1]
 27132:20180108:143513.505 server #7 started [http poller #1]
 27133:20180108:143513.505 server #8 started [discoverer #1]
 27134:20180108:143513.506 server #9 started [history syncer #1]
 27135:20180108:143513.506 server #10 started [history syncer #2]
 27136:20180108:143513.506 server #11 started [history syncer #3]
 27137:20180108:143513.507 server #12 started [history syncer #4]
 27138:20180108:143513.507 server #13 started [escalator #1]
 27139:20180108:143513.508 server #14 started [proxy poller #1]
 27145:20180108:143513.510 server #20 started [poller #4]
 27146:20180108:143513.510 server #21 started [poller #5]
 27140:20180108:143513.523 server #15 started [self-monitoring #1]
 27141:20180108:143513.523 server #16 started [task manager #1]
 27142:20180108:143513.523 server #17 started [poller #1]
 27150:20180108:143513.524 server #25 started [trapper #3]
 27143:20180108:143513.525 server #18 started [poller #2]
 27151:20180108:143513.526 server #26 started [trapper #4]
 27152:20180108:143513.528 server #27 started [trapper #5]
 27153:20180108:143513.530 server #28 started [icmp pinger #1]
 27154:20180108:143513.530 server #29 started [alert manager #1]
 27155:20180108:143513.530 server #30 started [preprocessing manager #1]
 27144:20180108:143513.533 server #19 started [poller #3]
 27148:20180108:143513.538 server #23 started [trapper #1]
 27149:20180108:143513.540 server #24 started [trapper #2]
 27147:20180108:143513.541 server #22 started [unreachable poller #1]
 27133:20180108:143513.542 slow query: 0.001181 sec, "select distinct r.druleid,r.iprange,r.name,c.dcheckid,r.proxy_hostid,r.delay from drules r left join dchecks c on c.druleid=r.druleid and c.uniq=1 where r.status=0 and r.nextcheck<=1515393313 and mod(r.druleid,1)=0"
 27157:20180108:143514.116 server #32 started [preprocessing worker #2]
 27158:20180108:143514.120 server #33 started [preprocessing worker #3]
 27156:20180108:143514.131 server #31 started [preprocessing worker #1]

相关文章

对接alertmanager创建钉钉卡片(1)
手把手教你搭建OpenFalcon监控系统
无需任何魔法即可使用 Ansible 的神奇变量“hostvars”
openobseve HA本地单集群模式
基于k8s上loggie/vector/openobserve日志收集
openobseve单节点和查询语法

发布评论