Unit 3 Graphical Reporting

Unit 3 Graphical Reporting

(1)
Configuring MRTG
1.       create an initial configuration
cfgmaker –global “workdir:/var/www/mrtg” \
--global “options[_]: growright” \
--ifref=name rh442@localhost \
> /etc/mrtg/mrtg.cfg
2.       customize /etc/mrtg/mrtg.cfg
sed –i ‘s/localhost_th0/eth0/g’ /etc/mrtg/mrtg.cfg
3.       run mrtg three times to build and populate required files
see /etc/cron.d/mrtg for default syntax and frequency
must be done after any change to /etc/mrtg/mrtg.cfg
 
Allowing access to MRTG
1.       Edit /etc/httpd/conf.d/mrtg.conf
Alias /mrtg /var/www/mtrg
<Location /mrtg>
           Order deny,allow
           Deny from all
           Allow from 127.0.0.1
           Allow from ::1
           Allow from .example.com
           Allow from example.com
</Location>
2        enable apache
Service httpd restart
Chkconfig httpd on
Creating a dashboard in MRTG
Useful but not required
Indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
Note :run indexmaker after any change to /etc/mrtg/mrtg.cfg
(2)
Iostat , sar, awk yum –y install sysstat
 
掌握知识点:SNMP,MRTG,Gnuplot,Syslog,awk,
 
 
 
自己做实验:
虚拟机配置三台:
一台主监控机 redhat 5.4 192.168.0.1
被监控机器 redhat 5.4 192.168.0.3
被监控机器windows server 2003 192.168.0.5
目的:使用snmp协议版本1配合图形化监控工具MRTG监控windows和linux端口流量
 

你可能感兴趣的:(mrtg)