码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix 安装 weathermap

时间:2016-09-01 16:32:06      阅读:944      评论:0      收藏:0      [点我收藏+]

标签:zabbix weathermap

wget http://network-weathermap.com/files/php-weathermap-0.97c.zip
unzip php-weathermap-0.97c.zip
cp -rp weathermap/ /usr/share/zabbix/
cd /usr/share/zabbix/weathermap/
# Verify
php check.php
# 2 "PHP Strict Standards" errors, not serious apparently
# Check if a weathermap.png was created in http://1.2.3.4/zabbix/weathermap/weathermap.png

# in editor.php :
$ENABLED=true;
// ...
// To avoid the warning message about Cacti
$ignore_cacti=TRUE;

cd /tmp
git clone https://github.com/amousset/php-weathermap-zabbix-plugin
cp -rp php-weathermap-zabbix-plugin/lib/* /usr/share/zabbix/weathermap/lib/

cd /usr/share/zabbix/weathermap
chown www-data configs/
chmod u+w configs/

cat >>/etc/apache2/conf.d/zabbix <<EOF
<Directory "/usr/share/zabbix/weathermap">
   <Files editor.php>
       Order Deny,Allow
       Deny from all
       Allow from 127.0.0.1
   </Files>
</Directory>
EOF

# in Zabbix GUI, create a "weathermap" user, read-only
# then in the graph conf file, global section :
SET zabbix_user weathermap
SET zabbix_password PASSWORD
SET zabbix_url http://1.2.3.4/zabbix/api_jsonrpc.php

# In the regular LINKS section :
LINK node1-node2
       TARGET zabbix:itemid:Switch1:24471:24263
       NODES node1 node2

# Then, generate the map :
./weathermap --config configs/simple.conf

技术分享

技术分享


本文出自 “luojing” 博客,请务必保留此出处http://luojinghappy.blog.51cto.com/683032/1845218

zabbix 安装 weathermap

标签:zabbix weathermap

原文地址:http://luojinghappy.blog.51cto.com/683032/1845218

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!