您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
1、在LVS上安装web和php服务 # yum install httpd php -y 2、在LVS上安装rrdtool工具 # wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz # tar zxvf rrdtool-1.4.7.tar.gz # cd rrdtool-1.4.7 # ./configure --prefix=/usr/local/rrdtool # make # make install # cd # echo "/usr/local/rrdtool/lib" >> /etc/ld.so.conf # ldconfig -v 3、下载安装lvs-rrd # wget http://tepedino.org/lvs-rrd/lvs-rrd-v0.7.tar.gz # tar -zxvf lvs-rrd-v0.7.tar.gz # mv lvs-rrd-v0.7 /var/www/html/lvs # cd /var/www/html/lvs/ 4、修改默认配置,主要是些命令的路径指向 # vim lvs.rrd.update ...... RRDTOOL="/usr/local/rrdtool/bin/rrdtool" IPVSADM="/sbin/ipvsadm" WORKDIR="/var/www/html/lvs/rrd" ...... # vim graph-lvs.sh ...... WORKDIR="/var/www/html/lvs/rrd" RRDTOOL="/usr/local/rrdtool/bin/rrdtool" GRAPHS="/var/www/html/lvs/graphs" WEBPATH="/lvs/graphs" ...... # vim lvs-rrd.php ...... <?php header("Cache-Control: max-age=300, must-revalidate"); system("/var/www/html/lvs/graph-lvs.sh -H"); ?> ...... 5、创建rrd绘图目录,并修改文件权限 # mkdir /var/www/html/lvs/rrd chown -R apache lvs/ 6、配置周期收集数据,并开启服务 # vim /etc/crontab * * * * * root /var/www/html/lvs/lvs.rrd.update # /etc/init.d/httpd restart # chkconfig httpd on 7、在nagios里设置监控lvs的url ...... define host{ use templete_hangzhou_callcenter host_name hangzhou_server_lvs_master alias hangzhou_server_lvs_master address 192.168.2.231 hostgroups hostgroup_servyou_hosts parents hangzhou_serverswitch_02 icon_p_w_picpath redhat_server.gif icon_p_w_picpath_alt redhat5.0 statusmap_p_w_picpath redhat_server.gd2 parents hangzhou_serverswitch_02 notes_url http://192.168.2.231/lvs #nagios监控lvs的url } .....
效果图:
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。