Squid and snmp to monitor with MRTG

Alan Womack arwbackup at worldnet.att.net
Fri Jul 4 06:49:27 PDT 2003


Having some trouble getting a new squid compile to answer snmp requests:

alan at webby:squid-2.5.STABLE3 $ /usr/local/mrtg-2/bin/mrtg /etc/mrtg/mrtg_squid.cfg
Daemonizing MRTG ...
alan at webby:squid-2.5.STABLE3 $ SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].3401)
                  community: "public"
                 request ID: -1799067916
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 458
SNMPGET Problem for cacheHttpAllSvcTime.5 cacheHttpAllSvcTime.5 cacheUptime cacheSoftware cacheVersionId on public at localhost:3401
 at /usr/local/mrtg-2/bin/mrtg line 1678
Use of uninitialized value in concatenation (.) or string at /usr/local/mrtg-2/bin/mrtg line 1681.
Modification of non-creatable array value attempted, subscript -2 at /usr/local/mrtg-2/bin/mrtg line 1681.



so here is proof squid was compiled with snmp:

root at webby:bin# ./squid -v
Squid Cache: Version 2.5.STABLE3
configure options:  --enable-snmp


my acl lines to enable snmp from squid.conf

acl snmppublic snmp_community public

snmp_access allow snmppublic localhost
snmp_access deny all

and finally the mrtg config file:

root at webby:bin# cat /etc/mrtg/mrtg_squid.cfg
Workdir: /usr/local/Alan/ia5/squid/
LoadMIBs: /etc/squid/mib.txt

RunAsDaemon: YES
Interval: 5
Refresh: 300

Target[squid.cache.client.resp]: "cacheHttpAllSvcTime.5&cacheHttpAllSvcTime.5:public at localhost:3401"
Title[squid.cache.client.resp]: Cache Statistics: Request Response time(ms)
PageTop[squid.cache.client.resp]: <H1>Cache Statistics: Request Response time(ms)</H1>
Xsize[squid.cache.client.resp]: 600
Ysize[squid.cache.client.resp]: 200
Ytics[squid.cache.client.resp]: 10
LegendI[squid.cache.client.resp]: Response Time 
ShortLegend[squid.cache.client.resp]:  ms 
LegendO[squid.cache.client.resp]:
Legend1[squid.cache.client.resp]: Response Time
Legend2[squid.cache.client.resp]:
YLegend[squid.cache.client.resp]: Response Time(ms)
MaxBytes[squid.cache.client.resp]: 500000
Options[squid.cache.client.resp]: gauge

Target[squid.cache.misses]: "cacheHttpMissSvcTime.5&cacheHttpMissSvcTime.5:public at localhost:3401"
Title[squid.cache.misses]: Cache Statistics: Cache Misses Response Time(ms)
PageTop[squid.cache.misses]: <H1>Cache Statistics: Cache misses response time(ms)</H1>
Xsize[squid.cache.misses]: 600
Ysize[squid.cache.misses]: 200
Ytics[squid.cache.misses]: 10
LegendI[squid.cache.misses]: Cache misses Response Time 
ShortLegend[squid.cache.misses]:  ms 
LegendO[squid.cache.misses]:
Legend1[squid.cache.misses]: Cache Misses Response Time(milliseconds)
Legend2[squid.cache.misses]:
YLegend[squid.cache.misses]: Cache Misses Response Time(ms)
MaxBytes[squid.cache.misses]: 500000
Options[squid.cache.misses]: gauge

Target[squid.cache.dns]: "cacheHttpMissSvcTime.5&cacheHttpMissSvcTime.5:public at localhost:3401"
Title[squid.cache.dns]: Cache Statistics: DNS Lookup Response Time(ms)
PageTop[squid.cache.dns]: <H1>Cache Statistics: DNS Lookup response time(ms)</H1>
Xsize[squid.cache.dns]: 600
Ysize[squid.cache.dns]: 200
Ytics[squid.cache.dns]: 10
LegendI[squid.cache.dns]: DNS Lookup Response Time
ShortLegend[squid.cache.dns]:  ms 
LegendO[squid.cache.dns]:
Legend1[squid.cache.dns]: DNS Lookup Response Time(milliseconds)
Legend2[squid.cache.dns]:
YLegend[squid.cache.dns]: DNS Lookup Response Time(ms)
MaxBytes[squid.cache.dns]: 500000
Options[squid.cache.dns]: gauge
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list