0082 | MRTG สำหรับจับการทำงานของ squid

แก้ squid.conf นิดหน่อย

acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic localhost
snmp_access deny all

แล้วเอาไอ้นี่ใส่ mrtg.cfg

LoadMIBs: /etc/squid/mib.txt
 
Target[cacheServerRequests]: cacheServerRequests&cacheServerRequests:public@localhost:3401
MaxBytes[cacheServerRequests]: 10000000
Title[cacheServerRequests]: Server Requests @ localhost
Options[cacheServerRequests]: growright, nopercent
PageTop[cacheServerRequests]: <h1>Server Requests @ localhost</h1>
YLegend[cacheServerRequests]: requests/sec
ShortLegend[cacheServerRequests]: req/s
LegendI[cacheServerRequests]: Requests&nbsp;
LegendO[cacheServerRequests]:
Legend1[cacheServerRequests]: Requests
Legend2[cacheServerRequests]:
 
Target[cacheProtoClientHttpRequests]: cacheProtoClientHttpRequests&cacheProtoClientHttpRequests:public@localhost:3401
MaxBytes[cacheProtoClientHttpRequests]: 10000000
Title[cacheProtoClientHttpRequests]: Client Http Requests @ localhost
Options[cacheProtoClientHttpRequests]: growright, nopercent
PageTop[cacheProtoClientHttpRequests]: <h1>Client Http Requests @ localhost</h1>
YLegend[cacheProtoClientHttpRequests]: requests/sec
ShortLegend[cacheProtoClientHttpRequests]: req/s
LegendI[cacheProtoClientHttpRequests]: Requests&nbsp;
LegendO[cacheProtoClientHttpRequests]:
Legend1[cacheProtoClientHttpRequests]: Requests
Legend2[cacheProtoClientHttpRequests]:
 
Target[cacheHttpHits]: cacheHttpHits&cacheHttpHits:public@localhost:3401
MaxBytes[cacheHttpHits]: 10000000
Title[cacheHttpHits]: HTTP Hits @ localhost
Options[cacheHttpHits]: growright, nopercent
PageTop[cacheHttpHits]: <h1>HTTP Hits @ localhost</h1>
YLegend[cacheHttpHits]: hits/sec
ShortLegend[cacheHttpHits]: hits/s
LegendI[cacheHttpHits]: Hits&nbsp;
LegendO[cacheHttpHits]:
Legend1[cacheHttpHits]: Hits
Legend2[cacheHttpHits]:
 
Target[cacheCpuUsage]: cacheCpuUsage&cacheCpuUsage:public@localhost:3401
MaxBytes[cacheCpuUsage]: 100
AbsMax[cacheCpuUsage]: 100
Title[cacheCpuUsage]: CPU Usage @ localhost
Options[cacheCpuUsage]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheCpuUsage]: dwmy
PageTop[cacheCpuUsage]: <h1>CPU Usage @ localhost</h1>
YLegend[cacheCpuUsage]: usage %
ShortLegend[cacheCpuUsage]:%
LegendI[cacheCpuUsage]: CPU Usage&nbsp;
LegendO[cacheCpuUsage]:
Legend1[cacheCpuUsage]: CPU Usage
Legend2[cacheCpuUsage]:
 
Target[cacheSysNumReads]: cacheSysNumReads&cacheSysNumReads:public@localhost:3401
MaxBytes[cacheSysNumReads]: 10000000
Title[cacheSysNumReads]: HTTP I/O number of reads @ localhost
Options[cacheSysNumReads]: growright, nopercent
PageTop[cacheSysNumReads]: <h1>HTTP I/O number of reads @ localhost</h1>
YLegend[cacheSysNumReads]: reads/sec
ShortLegend[cacheSysNumReads]: reads/s
LegendI[cacheSysNumReads]: I/O&nbsp;
LegendO[cacheSysNumReads]:
Legend1[cacheSysNumReads]: I/O
Legend2[cacheSysNumReads]:
 
Target[cacheCurrentFileDescrCnt]: cacheCurrentFileDescrCnt&cacheCurrentFileDescrCnt:public@localhost:3401
MaxBytes[cacheCurrentFileDescrCnt]: 1000000000
Title[cacheCurrentFileDescrCnt]: Used File Descriptors
Options[cacheCurrentFileDescrCnt]: gauge, growright, nopercent
PageTop[cacheCurrentFileDescrCnt]: <h1>Number of used file descriptors @ localhost</h1>
YLegend[cacheCurrentFileDescrCnt]: # of FDs
ShortLegend[cacheCurrentFileDescrCnt]: FDs
LegendI[cacheCurrentFileDescrCnt]: File Descriptors&nbsp;
LegendO[cacheCurrentFileDescrCnt]:
Legend1[cacheCurrentFileDescrCnt]: File Descriptors
Legend2[cacheCurrentFileDescrCnt]:
 
Target[cacheRequestHitRatio]: cacheRequestHitRatio.5&cacheRequestHitRatio.60:public@localhost:3401
MaxBytes[cacheRequestHitRatio]: 100
AbsMax[cacheRequestHitRatio]: 100
Title[cacheRequestHitRatio]: Request Hit Ratio @ localhost
Options[cacheRequestHitRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestHitRatio]: dwmy
PageTop[cacheRequestHitRatio]: <h1>Request Hit Ratio @ localhost</h1>
YLegend[cacheRequestHitRatio]: %
ShortLegend[cacheRequestHitRatio]: %
LegendI[cacheRequestHitRatio]: Median Hit Ratio (5min)&nbsp;
LegendO[cacheRequestHitRatio]: Median Hit Ratio (60min)&nbsp;
Legend1[cacheRequestHitRatio]: Median Hit Ratio
Legend2[cacheRequestHitRatio]: Median Hit Ratio
 
Target[cacheRequestByteRatio]: cacheRequestByteRatio.5&cacheRequestByteRatio.60:public@localhost:3401
MaxBytes[cacheRequestByteRatio]: 100
AbsMax[cacheRequestByteRatio]: 100
Title[cacheRequestByteRatio]: Byte Hit Ratio @ localhost
Options[cacheRequestByteRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestByteRatio]: dwmy
PageTop[cacheRequestByteRatio]: <h1>Byte Hit Ratio @ localhost</h1>
YLegend[cacheRequestByteRatio]: %
ShortLegend[cacheRequestByteRatio]:%
LegendI[cacheRequestByteRatio]: Median Hit Ratio (5min)&nbsp;
LegendO[cacheRequestByteRatio]: Median Hit Ratio (60min)&nbsp;
Legend1[cacheRequestByteRatio]: Median Hit Ratio
Legend2[cacheRequestByteRatio]: Median Hit Ratio

จริงๆ มันมีอีกเพียบเลย แต่ไม่รู้จะใส่ไว้ทำไม รก

Tags: ,