當伺服器超過50台,查看監控圖片已經成為一個很頭疼的事情,本身zabbix的Graphs可能不是特別人性化。
於是,我們需要一個展示性較強的頁面,Graphtrees或許可以。
Graphtrees需要zabbix版本3.0.1-3.0.3
PS:Graphtrees 可能不是最好的,但卻是目前能夠開源貢獻的
zabbix3.0.2
[root@zabbix_agentd ~]# zabbix_server -V
zabbix_server (Zabbix) 3.0.2
Revision 59540 20 April 2016, compilation time: Apr 20 2016 14:37:38
Copyright (C) 2016 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
[root@zabbix_agentd ~]#
首先,找到zabbix程式目錄,而後get graphtree3-0-1.patch,當然,事先備份程式目錄也是必要的
wget https://raw.githubusercontent.com/OneOaaS/graphtrees/master/graphtree3-0-1.patch
yum install -y patch
[root@zabbix_agentd php]# patch -Np0 <graphtree3-0-1.patch
patching file ./README.md
patching file ./biggraph.php
patching file ./graphtree.left.php
The next patch would delete the file graphtree/graphtree.patch,
which does not exist! Skipping patch.
1 out of 1 hunk ignored
patching file ./graphtree.right.php
patching file ./graphtrees.php
patching file ./hosts.php
patching file ./img/icon-sprite.svg
patching file ./img/oneoaas-wechat.jpg
patching file ./include/func.inc.php
patching file ./include/menu.inc.php
patching file ./include/page_header.php
patching file ./js/vendors/highlight.min.js
patching file ./js/vendors/jquery.ztree.core-3.5.js
patching file ./jsLoader.php
patching file ./locale/lt/LC_MESSAGES/frontend.po
patching file ./locale/lv/LC_MESSAGES/frontend.po
patching file ./locale/pt_BR/LC_MESSAGES/frontend.po
patching file ./styles/ztree/line_conn.gif
patching file ./styles/ztree/loading.gif
patching file ./styles/ztree/zTreeStandard.gif
patching file ./styles/ztree/zTreeStandard.png
patching file ./styles/ztree/zTreeStyle.css
如果是yum安裝的,則考慮作者第二種方式:
mv /usr/share/zabbix /usr/share/zabbix-old 這裡是重新命名zabbix
下載新的zabbix包
wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.0.1/zabbix-3.0.1.tar.gz
tar xf zabbix-3.0.1.tar.gz
cd zabbix-3.0.1/frontends/php
解壓後和第一種類似
wget https://raw.githubusercontent.com/OneOaaS/graphtrees/master/graphtree3-0-1.patch
yum install -y patch
patch -Np0 <graphtree3-0-1.patch
複製設定檔
cp -r /tmp/zbx/zabbix-3.0.1/frontends/php /usr/share/zabbix
cp /usr/share/zabbix-old/conf/zabbix.conf.php /usr/share/zabbix/conf/