Install MRTG, Apache2, Squid and SNMP
Backup /etc/snmp/snmpd.conf
Edit /etc/squid/squid.conf
Create configuration file:
To change this interval into 10 minutes, add this line into mrtg.cfg:
Interval : 10
To view MRTG graphs, go to http://localhost/mrtg/
sumber
http://colekcolek.com
http://widiy.blogspot.com/
$ sudo apt-get install apache2 snmpd mrtg snmp-mibs-downloader squidConfigure SNMPBackup /etc/snmp/snmpd.conf
$ sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bakCreate new /etc/snmp/snmpd.conf$ sudo nano /etc/snmp/snmpd.confand key in these lines:rocommunity public
syslocation "Bukit Batok"
syscontact xxxxxx@yahoo.com
com2sec public localhost public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public "" any noauth exact all none noneEdit /etc/default/snmpd:$ sudo nano /etc/default/snmpdand make sure it contains these lines:SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
SNMPDCOMPAT=yesConfigure SquidEdit /etc/squid/squid.conf
$ sudo nano /etc/squid/squid.confand make sure these lines exist:snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic allRestart Squid:$ sudo /usr/sbin/squid -k reconfigureConfigure MRTGCreate configuration file:
$ sudo cfgmaker --global 'WorkDir:/var/www/mrtg' --ifref=name --ifdesc=eth --global 'Options[_]: bits' --output /etc/mrtg.cfg --snmp-options=:::::1 public@localhostEdit /etc/mrtg.cfg and make sure these lines exist:Create MRTG index file:### Global Config Options
WorkDir: /var/www/mrtg
RunAsDaemon: yes
EnableIPv6: no
Options[_]: bits
LoadMIBS: /usr/share/snmp/mibs/SQUID.txt
### Squid Config
Target[proxy-hit]: cacheHttpHits&cacheServerRequests:public@localhost:3401
# If you are using Squid 2.6 or later, uncomment the following line
RouterName[proxy-hit]: cacheUniqName
MaxBytes[proxy-hit]: 100000
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]: <H1>proxy Cache Statistics: HTTP Hits/Requests</H1>
<TABLE>
<TR><TD>System:</TD><TD>saniya</TD></TR>
<TR><TD>Maintainer:</TD><TD>kumkum</TD></TR>
<TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
</TABLE>
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
Options[proxy-hit]: nopercent, perminute, dorelpercent, unknaszero
Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@localhost:3401
# If you are using Squid 2.6 or later, uncomment the following line
RouterName[proxy-srvkbinout]: cacheUniqName
MaxBytes[proxy-srvkbinout]: 76800
Title[proxy-srvkbinout]: Cache Server Traffic In/Out
PageTop[proxy-srvkbinout]: <H1>Cache Statistics: Server traffic volume (In/Out)</H1>
<TABLE>
<TR><TD>System:</TD><TD>saniya</TD></TR>
<TR><TD>Maintainer:</TD><TD>kumkum</TD></TR>
<TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
</TABLE>
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
Options[proxy-srvkbinout]: nopercent, perminute, unknaszero
$ sudo indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.htmlExecute MRTG:$ env LANG=C /usr/bin/mrtg /etc/mrtg.cfgMRTG will default graph the data every 5 minutes.To change this interval into 10 minutes, add this line into mrtg.cfg:
Interval : 10
To view MRTG graphs, go to http://localhost/mrtg/
sumber
http://colekcolek.com
http://widiy.blogspot.com/
Bagikan
Install MRTG di Ubuntu
4
/
5
Oleh
Unknown
SILAHKAN BERKOMENTAR UNTUK KASIH MASUKAN