[squid-users] Mrtg and squid

From: Angela Williams <angie@dont-contact.us>
Date: Fri, 6 Jul 2007 15:40:41 +0200

Hi All Squiders!
I have run many squid boxes over the years but never really worried about any
stats out of them other than cache manager and sarg.
We have just put a new box in to frontend an F5 Link controller which
frontends a few dsl lines.
I now really need to tweak this box for really good performance so have tried
mrtg to do this.
Here is the problem! I have had to change all the nice MIB names to dreadful
oid numbers to make it work.

Here is the config.
Gentoo linux with squid 2.6.STABLE12 and mrtg 2.15.1
The relevant lines from squid.conf are

acl snmppublic snmp_community public
snmp_port 3401 # Gentoo must specify this
snmp_access allow snmppublic all

The rest are all commented out to use defaults

My mrtg config file looks like this
# ####################
# Global Configuration
# ####################
RunAsDaemon: yes
EnableIPv6: no
Options[_]: bits,growright
WorkDir: /var/www/squid
IconDir: /images/
LoadMIBs: /opt/mrtg/squid/squid.mib

# #################################################
# Common stuff
# #################################################
PageTop[^]: <H1>Squid3 Squid Traffic Stats</H1><HR>
PageTop[$]: Contact Angela Williams if you have any questions<HR>

PageFoot[^]: <i>Page managed by <a href="mailto:angie@eoh.co.za">Angela
Williams
</a></i>
# #################################################
# Configuration for each Target you want to monitor
# #################################################
Target[cacheServerRequests]:
1.3.6.1.4.1.3495.1.3.2.1.10.0&1.3.6.1.4.1.3495.1.3.
2.1.10.0:public@squid3:3401
MaxBytes[cacheServerRequests]: 10000000
Title[cacheServerRequests]: Server Requests @ squid3
Options[cacheServerRequests]: growright, nopercent
PageTop[cacheServerRequests]: <h2>Server Requests @ squid3</h2>
YLegend[cacheServerRequests]: requests/sec
ShortLegend[cacheServerRequests]: req/s
LegendI[cacheServerRequests]: Requests&nbsp;
LegendO[cacheServerRequests]:
Legend1[cacheServerRequests]: Requests
Legend2[cacheServerRequests]:

These are the errors I see in my /var/log/mrtg.log file

2007-07-06 13:58:19 -- Started mrtg with config '/etc/squid-mrtg.conf'
2007-07-06 13:58:19 -- Unknown SNMP var cacheUptime
 at /usr/bin/mrtg line 2149
2007-07-06 13:58:19 -- Unknown SNMP var cacheSoftware
 at /usr/bin/mrtg line 2149
2007-07-06 13:58:19 -- Unknown SNMP var cacheVersionId
 at /usr/bin/mrtg line 2149
2007-07-06 13:58:19 -- Use of uninitialized value in concatenation (.) or
string at /usr/bin/mrtg line 2165.
2007-07-06 13:58:19 -- Use of uninitialized value in concatenation (.) or
string at /usr/bin/mrtg line 2165.

Repeated every 5 mins!

Using snmpget with a -m and the mib file gets me the correct results but it
seems to me that mrtg is not using the squid mibs. I have always tried to
avoid snmp until now! New learning curve again!

I could have a go at Hendrik Nordstrom's rrdtool stuff but that is another
learning curve!

I will post this to the mrtg list once I get subscribed!

Cheers
Ang

-- 
Angela Williams				Enterprise Outsourcing
Unix/Linux & Cisco spoken here!		Bedfordview
awilliams@eoh.co.za			Gauteng South Africa
Smile!! Jesus Loves You!!
Received on Mon Jul 09 2007 - 02:22:32 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:03 MDT