qq70191 发表于 2019-1-18 06:32:05

Zabbix 3.4.6 新特性:历史数据支持 Elasticsearch

  一、升级 cURL
  注:先升级 cURL,然后在安装 Zabbix Server,否则报如下错误:
cannot initialize history storage: cURL library support >= 7.28.0 is required for Elasticsearch history backend  开始升级 cURL:
# uname -r
2.6.32-642.el6.x86_64
# curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
# rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
Retrieving http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
warning: /var/tmp/rpm-tmp.1lrKA3: Header V3 DSA/SHA1 Signature, key ID b56a8bac: NOKEY
Preparing...                ###########################################
   1:city-fan.org-release   ###########################################
# yum upgrade libcurl
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
* city-fan.org: nervion.us.es
city-fan.org                                                                                                | 2.9 kB   00:00   
city-fan.org/primary_db                                                                                       | 459 kB   00:15   
Resolving Dependencies
--> Running transaction check
---> Package libcurl.x86_64 0:7.19.7-53.el6_9 will be updated
--> Processing Dependency: libcurl = 7.19.7-53.el6_9 for package: curl-7.19.7-53.el6_9.x86_64
--> Processing Dependency: libcurl = 7.19.7-53.el6_9 for package: libcurl-devel-7.19.7-53.el6_9.x86_64
---> Package libcurl.x86_64 0:7.57.0-1.0.cf.rhel6 will be an update
--> Processing Dependency: libssh2(x86-64) >= 1.8.0 for package: libcurl-7.57.0-1.0.cf.rhel6.x86_64
--> Processing Dependency: c-ares(x86-64) >= 1.13.0 for package: libcurl-7.57.0-1.0.cf.rhel6.x86_64
--> Processing Dependency: libnghttp2.so.14()(64bit) for package: libcurl-7.57.0-1.0.cf.rhel6.x86_64
--> Running transaction check
---> Package c-ares.x86_64 0:1.10.0-3.el6 will be updated
---> Package c-ares.x86_64 0:1.13.0-3.0.cf.rhel6 will be an update
---> Package curl.x86_64 0:7.19.7-53.el6_9 will be updated
---> Package curl.x86_64 0:7.57.0-1.0.cf.rhel6 will be an update
--> Processing Dependency: libmetalink.so.3()(64bit) for package: curl-7.57.0-1.0.cf.rhel6.x86_64
---> Package libcurl-devel.x86_64 0:7.19.7-53.el6_9 will be updated
---> Package libcurl-devel.x86_64 0:7.57.0-1.0.cf.rhel6 will be an update
epel/filelists_db                                                                                             | 7.8 MB   00:00   
city-fan.org/filelists_db                                                                                     | 334 kB   00:20   
--> Processing Dependency: libssh2-devel for package: libcurl-devel-7.57.0-1.0.cf.rhel6.x86_64
---> Package libnghttp2.x86_64 0:1.6.0-1.el6.1 will be installed
---> Package libssh2.x86_64 0:1.4.2-2.el6_7.1 will be updated
---> Package libssh2.x86_64 0:1.8.0-5.0.cf.rhel6 will be an update
--> Running transaction check
---> Package libmetalink.x86_64 0:0.1.3-4.rhel6 will be installed
---> Package libssh2-devel.x86_64 0:1.8.0-5.0.cf.rhel6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================
Package                         Arch                     Version                               Repository                      Size
=====================================================================================================================================
Updating:
libcurl                         x86_64                   7.57.0-1.0.cf.rhel6                   city-fan.org                   427 k
Installing for dependencies:
libmetalink                     x86_64                   0.1.3-4.rhel6                         city-fan.org                  24 k
libnghttp2                      x86_64                   1.6.0-1.el6.1                         epel                            56 k
libssh2-devel                   x86_64                   1.8.0-5.0.cf.rhel6                  city-fan.org                  73 k
Updating for dependencies:
c-ares                        x86_64                   1.13.0-3.0.cf.rhel6                   city-fan.org                  97 k
curl                            x86_64                   7.57.0-1.0.cf.rhel6                   city-fan.org                   494 k
libcurl-devel                   x86_64                   7.57.0-1.0.cf.rhel6                   city-fan.org                   946 k
libssh2                         x86_64                   1.8.0-5.0.cf.rhel6                  city-fan.org                  99 k
Transaction Summary
=====================================================================================================================================
Install       3 Package(s)
Upgrade       5 Package(s)
Total download size: 2.2 M
Is this ok : y
Downloading Packages:
(1/8): c-ares-1.13.0-3.0.cf.rhel6.x86_64.rpm                                                                  |97 kB   00:06   
(2/8): curl-7.57.0-1.0.cf.rhel6.x86_64.rpm                                                                  | 494 kB   00:27   
(3/8): libcurl-7.57.0-1.0.cf.rhel6.x86_64.rpm                                                               | 427 kB   00:26   
(4/8): libcurl-devel-7.57.0-1.0.cf.rhel6.x86_64.rpm                                                         | 946 kB   00:56   
(5/8): libmetalink-0.1.3-4.rhel6.x86_64.rpm                                                                   |24 kB   00:01   
(6/8): libnghttp2-1.6.0-1.el6.1.x86_64.rpm                                                                  |56 kB   00:00   
(7/8): libssh2-1.8.0-5.0.cf.rhel6.x86_64.rpm                                                                  |99 kB   00:04   
(8/8): libssh2-devel-1.8.0-5.0.cf.rhel6.x86_64.rpm                                                            |73 kB   00:05   
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 17 kB/s | 2.2 MB   02:12   
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID b56a8bac: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
Importing GPG key 0xB56A8BAC:
Userid : city-fan.org software librarian
Package: city-fan.org-release-1-13.rhel6.noarch (installed)
From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org
Is this ok : y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating   : libssh2-1.8.0-5.0.cf.rhel6.x86_64                                                                              1/13
Installing : libssh2-devel-1.8.0-5.0.cf.rhel6.x86_64                                                                        2/13
Updating   : c-ares-1.13.0-3.0.cf.rhel6.x86_64                                                                              3/13
Installing : libmetalink-0.1.3-4.rhel6.x86_64                                                                                 4/13
Installing : libnghttp2-1.6.0-1.el6.1.x86_64                                                                                  5/13
Updating   : libcurl-7.57.0-1.0.cf.rhel6.x86_64                                                                               6/13
Updating   : libcurl-devel-7.57.0-1.0.cf.rhel6.x86_64                                                                         7/13
Updating   : curl-7.57.0-1.0.cf.rhel6.x86_64                                                                                  8/13
Cleanup    : libcurl-devel-7.19.7-53.el6_9.x86_64                                                                           9/13
Cleanup    : curl-7.19.7-53.el6_9.x86_64                                                                                     10/13
Cleanup    : libcurl-7.19.7-53.el6_9.x86_64                                                                                  11/13
Cleanup    : libssh2-1.4.2-2.el6_7.1.x86_64                                                                                  12/13
Cleanup    : c-ares-1.10.0-3.el6.x86_64                                                                                    13/13
Verifying: libnghttp2-1.6.0-1.el6.1.x86_64                                                                                  1/13
Verifying: libcurl-devel-7.57.0-1.0.cf.rhel6.x86_64                                                                         2/13
Verifying: libmetalink-0.1.3-4.rhel6.x86_64                                                                                 3/13
Verifying: libssh2-1.8.0-5.0.cf.rhel6.x86_64                                                                              4/13
Verifying: libcurl-7.57.0-1.0.cf.rhel6.x86_64                                                                               5/13
Verifying: libssh2-devel-1.8.0-5.0.cf.rhel6.x86_64                                                                        6/13
Verifying: curl-7.57.0-1.0.cf.rhel6.x86_64                                                                                  7/13
Verifying: c-ares-1.13.0-3.0.cf.rhel6.x86_64                                                                              8/13
Verifying: libssh2-1.4.2-2.el6_7.1.x86_64                                                                                 9/13
Verifying: libcurl-devel-7.19.7-53.el6_9.x86_64                                                                            10/13
Verifying: libcurl-7.19.7-53.el6_9.x86_64                                                                                  11/13
Verifying: curl-7.19.7-53.el6_9.x86_64                                                                                     12/13
Verifying: c-ares-1.10.0-3.el6.x86_64                                                                                    13/13
Dependency Installed:
libmetalink.x86_64 0:0.1.3-4.rhel6      libnghttp2.x86_64 0:1.6.0-1.el6.1      libssh2-devel.x86_64 0:1.8.0-5.0.cf.rhel6      
Updated:
libcurl.x86_64 0:7.57.0-1.0.cf.rhel6                                                                                             
Dependency Updated:
c-ares.x86_64 0:1.13.0-3.0.cf.rhel6       curl.x86_64 0:7.57.0-1.0.cf.rhel6       libcurl-devel.x86_64 0:7.57.0-1.0.cf.rhel6      
libssh2.x86_64 0:1.8.0-5.0.cf.rhel6      
Complete!
# curl --version                  
curl 7.57.0 (x86_64-pc-linux-gnu) libcurl/7.57.0 OpenSSL/1.0.1e zlib/1.2.3
Release-Date: 2017-11-29
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets HTTPS-proxy  
  新网址http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel6.noarch.rpm,访问http://mirror.city-fan.org/ftp/contrib/yum-repo/要往下拉,就可以看见所需软件包,同时需要随时关注。
http://s1.运维网.com/images/20180206/1517880720254513.jpg
  升级 Zabbix

  见 Zabbix 3.2 升级到 Zabbix 3.4.6

  二、编辑配置 Zabbix 3.4.6 相关配置文件
Zabbix Web 配置历史数据读 Elasticsearch
# rm -rf /app/product/nginx/html/zabbix/conf/{zabbix.conf.php,zabbix.conf.php.example}
# cp /opt/software/zabbix-3.4.6/frontends/php/conf/zabbix.conf.php.example /app/product/nginx/html/zabbix/conf/
# cd /app/product/nginx/html/zabbix/conf
# cp zabbix.conf.php.example zabbix.conf.php
# ls
maintenance.inc.phpzabbix.conf.phpzabbix.conf.php.example
# vim zabbix.conf.php
页: [1]
查看完整版本: Zabbix 3.4.6 新特性:历史数据支持 Elasticsearch