In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
At the end of 2013, I was lucky to enter the unit where I now work. At that time, the company used zennos monitoring system, due to the original zennos architecture design and its own functional limitations, can not meet the needs of the company's business. Since 2014, he has been responsible for the testing of zabbix monitoring system, including zabbix function research, distributed deployment and performance tuning.
Zabbix is powerful and can monitor systems, networks, hardware and applications, and custom key can monitor any monitoring project you can think of. The latest stable version is 3.2. due to the support for encrypted communications, trend forecasting and higher front-end pages after 3.0, we plan to upgrade zabbix from 2.2.3 to 3.2.1.
At present, the amount of server data monitored by zabbix is about 1000, with two years' historical data saved and the background database 2T. The whole distributed monitoring system has one server,3 proxy and two MySQL databases, the database is one master and one slave, and the slave database is mainly used as backup. Because agent of zabbix 2.2.3 is compatible with 3.2.1, agent of all server clients does not need to be upgraded, only server and proxy need to be upgraded.
Check the requirements of the MySQL database, PHP, and its extended library versions required for zabbix 3.2.1 before upgrading. The version of the MySQL database must be 5.0.3 or later. The requirements for front-end pages for PHP and extension libraries are as follows:
If all the above requirements are supported, then you can upgrade. Before upgrading, you need to make a backup of the data to facilitate quick rollback to version 2.2.3 when the upgrade fails. The backup data include zabbix database, zabbix server configuration files, binaries and php files, zabbix proxy configuration files and binaries.
In order to reduce downtime and loss of historical data during the upgrade, the official recommendation is to stop the zabbix server service and upgrade zabbix server. Then start the proxy service after stopping the proxy service and upgrading proxy. After such a proxy upgrade, upgrade another proxy, and start the zabbix server service after all the proxy has been upgraded.
Step 1: upgrade zabbix server.
1) stop the zabbix server service and make sure that no data is insert into the zabbix data.
2) back up the zabbix database, because I have synchronized the MySQL master-slave database, I only need to stop the master-slave synchronization, and the slave database is the standby database.
3) back up the configuration file of zabbix server, the PHP file of the front-end page and the binary startup file. I recommend using mv directly for backup here.
[root@monitor ~] # mv / etc/zabbix / etc/zabbix_version_ 2.2.3 [root @ monitor ~] # mv / usr/local/zabbix / usr/local/zabbix_version_ 2.2.3 [root @ monitor ~] # mv / data/www/zabbix / data/www/zabbix_version_2.2.3
4) install the new zabbix3.2.1 software package.
[root@monitor software] # tar-zxvf zabbix-3.2.1.tar.gz [root@monitor software] # cd zabbix-3.2.1 [root@monitor zabbix-3.2.1] #. / configure-- prefix=/usr/local/zabbix-- sysconfdir=/etc/zabbix-- with-mysql=/usr/local/mysql/bin/mysql_config-- with-net-snmp-- enable-agent-- enable-server-- with-libcurl [root@monitor zabbix-3.2.1] # make & & make install
5) modify the configuration file of zabbix server by referring to the configuration file of 2.2.3. Some parameters have changed, and most of the parameters are consistent. Make sure that the database users in the configuration file have sufficient permissions (create table, drop table, create index, drop index).
Step 2: upgrade zabbix proxy.
1) stop the zabbix proxy service.
2) back up the configuration file and binary startup file of zabbix proxy. I recommend using mv directly for backup here.
[root@proxy01 ~] # mv / etc/zabbix / etc/zabbix_version_ 2.2.3 [root @ proxy01 ~] # mv / usr/local/zabbix / usr/local/zabbix_version_2.2.3
3) install the new zabbix3.2.1 software package.
[root@proxy01 software] # tar-zxvf zabbix-3.2.1.tar.gz [root@proxy01 software] # cd zabbix-3.2.1 [root@proxy01 zabbix-3.2.1] #. / configure-- prefix=/usr/local/zabbix-- sysconfdir=/etc/zabbix-- with-mysql=/usr/local/mysql/bin/mysql_config-- with-net-snmp-- enable-agent-- enable-proxy-- with-libcurl [root@proxy01 zabbix-3.2.1] # make & & make install
4) modify the configuration file of zabbix proxy by referring to the configuration file of 2.2.3. Some parameters have changed, and most of the parameters are consistent.
5) start the zabbix proxy service, and proxy will automatically upgrade the database in the background. Check the proxy log until the upgrade is complete.
[root@proxy01 zabbix-3.2.1] # / usr/local/zabbix/sbin/zabbix_ proxy [root @ proxy01 zabbix-3.2.1] # tail-f / data/logs/zabbix/zabbix_proxy.log 47609 proxy01 zabbix-3.2.1 20161117 Starting Zabbix Proxy (active) [shproxy01]. Zabbix 3.2.1 (revision 62890). 47609 IPMI monitoring 20161117 Enabled features 135742.277 * Enabled features * 47609 20161117 SNMP monitoring: 201611609 IPMI monitoring: NO 47609 201611277 SSH2 support: NO 47609 201611277 IPv6 support: 201611277 IPv6 support: NO 47609 using configuration file: / / etc/zabbix/zabbix_proxy.conf 47609 using configuration file 20161117 135742.277 using configuration file: / / etc/zabbix/zabbix_proxy.conf 47609 using configuration file 20161117 135742.311 current database version (mandatory/optional): 02020000 Universe 020609 47609 47609 required mandatory version 2016175742.311 starting automatic database upgrade 47609 of database upgrade 20161117 completed 135742.312 of database upgrade. 47609 completed 20161117completed 140415.027 completed 95% of database upgrade 47609 of database upgrade 47609 of database upgrade 2016111715 140415.149 completed 96% of database upgrade 47609 of database upgrade 2016111715 140415.251 completed 97% of database upgrade 47609 20161117completed 140415.597 completed 98% of database upgrade 47609 2016111715 140415.815 completed 99% of database upgrade 47609 20161117mer 140415.921 completed% of database upgrade 47609 20161117race 20161117race 140415.921 database upgrade fully completed
6) repeat the 1-5 above to upgrade the other two proxy services.
Step 3: restart the proxy service after all the zabbix server services have been upgraded. Then check the log. If database upgrade fully completed appears, the server upgrade is successful.
[root@monitor] # / usr/local/zabbix/sbin/zabbix_server [root@monitor ~] # tail-f / data/logs/zabbix/zabbix_server.log 19002 tail 20161117 root@monitor 144351.201 Starting Zabbix Server. Zabbix 3.2.1 (revision 62890). 19002 IPMI monitoring 2016111714 144351.201 * Enabled features * 19002 IPMI monitoring 20161117 YES 144351.201 IPMI monitoring: NO 19002 IPMI monitoring 20161117 144351.201 Web monitoring: YES 19002 IPMI monitoring 20161117 144351.201 VMware monitoring: NO 19002 IPMI monitoring 20161117R 144351.201 Jabber notifications: NO 19002: 20161117purl 144351.201 Jabber notifications: 144351.201 Ez Texting notifications: YES 19002 NO 20161117 ODBC 144351.201 SSH2 support: NO 19002 20161117 NO 144351.201 IPv6 support: NO 19002 20161117 144351.201 TLS support: NO 19002 20161117 144351.201 * * * * 19002 using configuration file 20161117 mandatory/optional 144351.213 current database version (mandatory/optional): 02020000 190001 19002 current database version 2016111714351.213 required mandatory version: 03020000 19002current database version 2016111714351.213 starting automatic database upgrade 19002current database version 201617351.213 starting automatic database upgrade 201617351.214% of database upgrade 2016111714351.501% of database upgrade 19002% completed 19002 of database upgrade. 19002 of database upgrade 20161117completed 144807.873 completed 95% of database upgrade 19002 of database upgrade 2016111715 144808.283 completed 96% of database upgrade 19002 of database upgrade 2016111714808.541 completed 97% of database upgrade 19002 completed 201611144811.410 completed 98% of database upgrade 19002 20161117 144812.120 completed 19002 20161117 144812.791 completed of database upgrade 19002 20161117 144812.791 database upgrade fully completed
Step 4: install the zabbix front-end WEB service, and everything is going well.
Summary:
1) officially, although it is said that the requirement for php in zabbix 3.2.1 is 5.4.0 or newer, it is found that if PHP is version 5.4.24, Last 20 issues will not display data and the front-end page will not report an error, but the function will not be affected. Finally, upgrade PHP to version 5.5.38 to solve this problem.
Array_map () expects parameter 1 to be a valid callback No array or string given [zabbix.php:21 → require_once () → ZBase- > run () → ZBase- > proce***equest () → CView- > getOutput () → include () → make_system_status () → makeTriggersPopup () → CMacrosResolverHelper::resolveEventDescription () → CMacrosResolver- > resolveTriggerNames () → CMacrosResolverGeneral- > findFunctions () → CMacroParser- > _ _ construct () → array_map () in include/classes/parsers/CMacroParser.php:60 Argument 1 passed to CSetParser::__construct () must be of the type array Null given Called in / data/online/zabbix/include/classes/parsers/CMacroParser.php online 60 and defined [zabbix.php:21 → require_once () → ZBase- > run () → ZBase- > proce***equest () → CView- > getOutput () → include () → make_system_status () → makeTriggersPopup () → CMacrosResolverHelper::resolveEventDescription () → CMacrosResolver- > resolveTriggerNames () → CMacrosResolverGeneral- > findFunctions () → CMacroParser- > _ construct () → CSetParser- > _ construct ( ) in include/classes/parsers/CSetParser.php:43] array_flip () expects parameter 1 to be array Null given [zabbix.php:21 → require_once () → ZBase- > run () → ZBase- > proce***equest () → CView- > getOutput () → include () → make_system_status () → makeTriggersPopup () → CMacrosResolverHelper::resolveEventDescription () → CMacrosResolver- > resolveTriggerNames () → CMacrosResolverGeneral- > findFunctions () → CMacroParser- > _ _ construct () → CSetParser- > _ construct () → array_flip () in include/classes/parsers/CSetParser.php:44] Implode (): Argument must be an array [zabbix.php:21 → require_once () → ZBase- > run () → ZBase- > proce***equest () → CView- > getOutput () → include () → make_system_status () → makeTriggersPopup () → CMacrosResolverHelper::resolveEventDescription () → CMacrosResolver- > resolveTriggerNames () → CMacrosResolverGeneral- > findFunctions () → CMacroParser- > _ construct () → CSetParser- > _ construct () → implode () implode]
2) check whether php session has write permission. If there is no write permission, the front-end page will also make errors.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.