Re: [squid-users] SNMP and squid ( with mrtg or another client )

From: Daryl Fonseca-Holt <fonsecah@dont-contact.us>
Date: Wed, 10 Apr 2002 09:37:32 -0500 (CDT)

On Wed, 10 Apr 2002, GUILHEM Michel (75) wrote:

> Did you know a site which gives all the things that i have to do for use
> snmp under squid ?
> I got site which describes acl for squid 2.1 and 2.2 , no problems , i
> see the port 3401 to listen the datas , i try to use mrtg like snmp client .
> But i cannot obtain the datas .
> Did you have an example of mrtg.cfg to listen squid .
> For squid i compile with enable-snmp and i add acl , any more ?
> Thanks you for any clue , i am a newbie in snmp .
>
> Guilhem michel , DGCP ( 60.000 users under my squid , it's works fine !!!! )
>
>

Below is the mrtg config we use with Squid. But there is one change
that must be made to some other part of mrtg because Squid is not using
the standard SNMP port. By default Squid uses 3401. Unfortunately I do not
remember what part of the mrtg configuration must be changed to poll port
3401. We chose not to change the port using the squid configuration
because we use the standard SNMP port on that machine to obtain
information from Solaris regarding hardware utilization, etc.

Please note that the memory graph generated by the mrtg configuration is
pretty usually. Our Squid seems to grow after starting to the maximum and
stay there. Does show downtime nicely though. We get a nice big canyon in
the plateau.

######################################################################
# Configuration file for Squid Proxy Server #
######################################################################

WorkDir: /usr/local/apache/htdocs/unix/server/zubra
IconDir: /images/
LoadMIBs: /usr/local/mrtg-2/config/squid.mib.txt

# IconDir: /usr/local/apache/images/
# LogDir: /usr/local/mrtg-2/logs

# HtmlDir: /usr/local/apache/htdocs/unix/server/zubra
# ImageDir: /usr/local/apache/htdocs/unix/server/zubra

WriteExpires: Yes

# Because Squid runs on another port and only responds to it's own
# MIB variables, we don't want to get sysUptime or sysName.
NoMib2: Yes

WithPeak[_]: ymw
AbsMax[_]: 999999999
MaxBytes[_]: 12500000

# 1.3.6.1.4.1 => enterprises
# .3495 => nlanr
# .1 => squid
# .3 => cache Perf
# .1 => cacheProtoStats
# .2 => cacheMedianSvcTable
# .1 => cacheMedianSvcEntry
# .5 => cacheHttpHitSvcTime
Target[hit-time]:
    .1.3.6.1.4.1.3495.1.3.1.2.1.5&.1.3.6.1.4.1.3495.1.3.1.2.1.5:public@zubra:3401::::
Directory[hit-time]: hit-time
Options[hit-time]: noi, growright, noinfo, nopercent, unknaszero
MaxBytes[hit-time]: 12500000
Title[hit-time]: Squid HTTP Hit Service Time
PageTop[hit-time]: <H1>Squid HTTP Hit Service Time</H1>
YLegend[hit-time]: ms
ShortLegend[hit-time]: ms
Legend2[hit-time]: Cache Service Hit Time
Legend4[hit-time]: Maximal 5 Minute Hit Service Time
LegendI[hit-time]:
LegendO[hit-time]: &nbsp;Hit&nbsp;Time:&nbsp;

Target[miss-near]:
    cacheHttpMissSvcTime.5&cacheHttpNmSvcTime.5:public@zubra:3401::::
Directory[miss-near]: miss-near
Options[miss-near]: growright, nopercent, gauge
MaxBytes[miss-near]: 12500000
Title[miss-near]: Squid HTTP miss vs near-miss service time
PageTop[miss-near]: <H1>Squid HTTP miss vs near-miss service time</H1>
YLegend[miss-near]: ms
ShortLegend[miss-near]: ms

# 1.3.6.1.4.1 => enterprises
# .3495 => nlanr
# .1 => squid
# .3 => cache Perf
# .2 => cacheProtoStats
# .1 => cacheProtoAggregateStats
# .1 => cacheProtoClientHttpRequests
# .2 => cacheHttpHits
Target[requests]:
    .1.3.6.1.4.1.3495.1.3.2.1.1&.1.3.6.1.4.1.3495.1.3.2.1.2:public@zubra:3401::::
Directory[requests]: requests
Options[requests]: perhour, growright, nopercent
MaxBytes[requests]: 12500000
AbsMax[requests]: 999999999
Title[requests]: Squid Client Requests vs Cache Hits
PageTop[requests]: <H1>Squid Client Requests vs Cache Hits</H1>
YLegend[requests]: Req vs Hits
Legend1[requests]: Squid Client Requests
Legend2[requests]: Cache Hits
Legend3[requests]: Maximal 5 Minute Client Requests
Legend4[requests]: Maximal 5 Minute Cache Hits
LegendI[requests]: &nbsp;Req:&nbsp;
LegendO[requests]: &nbsp;Hits:&nbsp;
ShortLegend[requests]: Req/Hr

# 1.3.6.1.4.1 => enterprises
# .3495 => nlanr
# .1 => squid
# .3 => cache Perf
# .1 => cacheProtoStats
# .2 => cacheMedianSvcTable
# .1 => cacheMedianSvcEntry
# .2 => cacheHttpAllSvcTime
Target[service-time]:
    .1.3.6.1.4.1.3495.1.3.1.2.1.2&.1.3.6.1.4.1.3495.1.3.1.2.1.2:public@zubra:3401::::
Directory[service-time]: service-time
Options[service-time]: noi, growright, noinfo, nopercent, unknaszero
MaxBytes[service-time]: 12500000
Title[service-time]: Squid HTTP all service time
PageTop[service-time]: <H1>Squid HTTP all service time</H1>
YLegend[service-time]: ms
ShortLegend[service-time]: ms
Legend2[service-time]: Service Time
Legend4[service-time]: Maximal 5 Minute Service Time
LegendI[service-time]:
LegendO[service-time]: Service&nbsp;Time

Target[cpu-usage]:
    cacheCpuUsage&cacheCpuUsage:public@zubra:3401::::
Directory[cpu-usage]: cpu-usage
Options[cpu-usage]: gauge, growright, noi, nopercent
MaxBytes[cpu-usage]: 12500000
Title[cpu-usage]: Squid CPU Usage
PageTop[cpu-usage]: <H1>Squid CPU Usage</H1>
YLegend[cpu-usage]: CPU Usage
Legend2[cpu-usage]: CPU Usage
Legend4[cpu-usage]: Maximal 5 Minute CPU Usage
LegendI[cpu-usage]:
LegendO[cpu-usage]: &nbsp;CPU usage:&nbsp;
ShortLegend[cpu-usage]: %

Target[mem-usage]: cacheMemUsage&cacheMemUsage:public@zubra:3401
Directory[mem-usage]: mem-usage
MaxBytes[mem-usage]: 1000000
Title[mem-usage]: Squid Memory Usage
Options[mem-usage]: gauge, growright, noi, nopercent
PageTop[mem-usage]: <h1>Memory Usage</h1>
YLegend[mem-usage]: Bytes
kMG[mem-usage]: k,M,G,T,P
ShortLegend[mem-usage]: B
LegendI[mem-usage]: Memory Usage
LegendO[mem-usage]:
Legend1[mem-usage]: Memory Usage
Legend2[mem-usage]:

--
Daryl Fonseca-Holt          | email: fonsecah@cc.UManitoba.CA
Unix Software Administrator | phone: (204) 474-6940
University of Manitoba      | fax:   (204) 474-7515
Received on Wed Apr 10 2002 - 08:37:48 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:07:31 MST