Warning: Parameter 3 to mb_videobot() expected to be a reference, value given in /home/www/virtual/susethailand.com/htdocs/libraries/joomla/event/dispatcher.php on line 136
MRTG-Squid
การใช้ MRTG Monitoring Proxy Server
1. ติดตั้ง mrtg, squid จาก YaST
# mkdir /srv/www/htdocs/mrtg/proxy
2. สร้างไฟล์ mrtg-proxy.cfg
# vi /srv/www/htdocs/mrtg/mrtg-proxy.cfg
LoadMIBs: /usr/share/squid/squid.mib
Target[proxy-hit]:
cacheHttpHits&cacheProtoClientHttpRequests:public@localhost:3401
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]:
<H1>proxy Cache Statistics: HTTP Hits / Requests</H1>
MaxBytes[proxy-hit]: 1000000000
Suppress[proxy-hit]: y
LegendI[proxy-hit]: HTTP hits
LegendO[proxy-hit]: HTTP requests
Legend1[proxy-hit]: HTTP hits
Legend2[proxy-hit]: HTTP requests
YLegend[proxy-hit]: perminute
ShortLegend[proxy-hit]: req/min
Target[proxy-srvkbinout]:
cacheServerInKb&cacheServerOutKb:public@localhost:3401
Title[proxy-srvkbinout]: Cache Server Traffic In / Out
PageTop[proxy-srvkbinout]:
<H1>Cache Statistics: Server traffic volume (In/Out) </H1>
MaxBytes[proxy-srvkbinout]: 1000000000
Suppress[proxy-srvkbinout]: y
LegendI[proxy-srvkbinout]: Traffic In
LegendO[proxy-srvkbinout]: Traffic Out
Legend1[proxy-srvkbinout]: Traffic In
Legend2[proxy-srvkbinout]: Traffic Out
YLegend[proxy-srvkbinout]: per minute
ShortLegend[proxy-srvkbinout]: b/min
kMG[proxy-srvkbinout]: k,M,G,T
kilo[proxy-srvkbinout]: 1024
3. cp /usr/share/squid/mib.txt /usr/share/squid/squid.mib
4. vi /etc/squid/squid.conf
acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic all
# squid -k reconfigure
# cd /usr/bin/
# cfgmaker --global "workdir: /srv/www/htdocs/mrtg/proxy" -ifref=ip
--output /srv/www/htdocs/mrtg/mrtg-proxy.cfg
--global 'options[_]: growright,bits' public@localhost
### สร้าง index.html ไฟล์ ###
# indexmaker --output=/srv/www/htdocs/mrtg/proxy/index.html
/srv/www/htdocs/mrtg/mrtg-proxy.cfg
### สร้าง Graphs! ####
# env LANG=C /usr/bin/mrtg /srv/www/htdocs/mrtg/mrtg-proxy.cfg
--logging /var/log/mrtg-proxy.log
### สร้าง Graphs ทุกๆ 5 นาที ###
# crontab -e
*/5 * * * * /usr/bin/mrtg /srv/www/htdocs/mrtg/mrtg-proxy.cfg
--logging /var/log/mrtg-proxy.log
เสร็จแล้วครับ.

written by SCOTTErna20, August 17, 2010












