1, installation RRDtool
tar xvzf rrdtool-1.4. 7. Tar . GZCD RRDtool-1.4. 7 . /configure-prefix=/usr/local/rrdtool make make instal
Add the RRDtool library file to the system library file search path when the installation is complete
Echo ' /usr/local/rrdtool/lib ' >>/etc/ld.so.conf ldconfig–v/usr/local/rrdtool/bin/rrdtool–v #查看rrdtool版本信息
2. Installation Configuration Lvs-rrd
tar xvzf lvs-rrd-v0. 7. Tar . GZ MV Lvs-rrd-v0. 7 /var/www/html/lvs-rrdmkdir /var/www/html/lvs-rrd/rrd
Modify Configuration
Vim Lvs.rrd.updateRRDTOOL= "/usr/local/rrdtool/bin/RRDtool "#rrdtool可执行程序路径IPVSADM= "/sbin/Ipvsadm "#ipvsadm命令路径WORKDIR= "/var/www/html/lvs-rrd/rrd "#rrdtool收集的数据的存放路径vim graph-lvs.SH# Workdir must match the directory usedinchThe update script. Workdir= "/var/www/html/lvs-rrd/rrd "#rrdtool收集的数据存放的路径RRDTOOL= "/usr/local/rrdtool/bin/RRDtool "#rrdtool可执行程序路径 # Where to put the graphs. GRAPHS= "/var/www/html/lvs-rrd/graphs "#生成的图片保存路径WEBPATH= "/lvs-rrd/graphs "#图片路径vim LVs-rrd.php<?Phpheader ("Cache-control:max-age= -, must-revalidate "); System ("/var/www/html/lvs-rrd/graph-lvs.SH-H "); #修改路径为部署服务的路径?>sudo Chown-R APACHE.APACHE/VAR/WWW/HTML/LVS-RRD
3. Configure periodic data collection
/var/www/html/lvs-rrd/lvs.rrd.update &>/dev/Null
4. Apache Configuration:
alias/lvs/var/www/html/lvs-rrd"/var/www/html/lvs-rrd">" LVS Status"/etc/httpd/conf/. Htpasswdrequire valid-user</ Directory>
Generate a password file
HTPASSWD-CM/ETC/HTTPD/CONF/.HTPASSWD Admin
A monitoring diagram of the previous production environment:
Deploying LVS-RRD Monitoring LVS