tar -xvzf zlib.tar.gz cd zlib-1.1.3/ ./configure make make test make install
tar -xvzf libpng-1.0.5.tar.gz cd libpng-1.0.5 cp scripts/makefile.linux makefile make make test make install
tar -xvzf rrdtool-1.0.11.tar.gz cd rrdtool-1.0.11 ./configure make make install
tar -xvzf gd-1.7.3.tar.gz cd gd-1.7.3 make make install
tar -xvzf mrtg-2.8.12.tar.gz; cd mrtg-2.8.12/run patch -l <~/mrtg-db.patch cd .. ./configure ; make
Change Workdir, Icondir, change all the server names, possibly change the community string
Copy * from mrtg-2.8.12/images to your mrtg web directory.
From the Squid FAQ:
To use SNMP, it must first be enabled with the configure script, and squid rebuilt. To enable is first run the script:
./configure --enable-snmp [ ... other configure options ]
Next, recompile after cleaning the source tree :
make clean
make all
make install
Once the compile is completed and the new binary is installed the squid.conf file
needs to be configured to allow access; the default is to deny all requests. The
instructions on how to do this have been broken into two parts, the first for all versions
of Squid from 2.2 onwards and the second for 2.1 and below.
To configure SNMP first specify a list of communities that you would like to allow access by using a standard acl of the form:
acl aclname snmp_community string
For example:
acl snmppublic snmp_community public
acl snmpjoebloggs snmp_community joebloggs
This creates two acl's, with two different communities, public and joebloggs. You can
name the acl's and the community strings anything that you like.
To specify the port that the agent will listen on modify the "snmp_port" parameter, it is defaulted to 3401. The port that the agent will forward requests that can not be furfilled by this agent to is set by "forward_snmpd_port" it is defaulted to off. It must be configured for this to work. Remember that as the requests will be originating from this agent you will need to make sure that you configure your access accordingly.
To allow access to Squid's SNMP agent, define an snmp_access ACL with the community strings that you previously defined. For example:
snmp_access allow snmppublic localhost
snmp_access deny all
The above will allow anyone on the localhost who uses the community public to
access the agent. It will deny all others access.
If you do not define any snmp_access ACL's, then SNMP access is denied by default.
Finally squid allows to you to configure the address that the agent will bind to for incomming and outgoing traffic. These are defaulted to 0.0.0.0, changing these will cause the agent to bind to a specific address on the host, rather than the default which is all.
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 0.0.0.0
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/matija/mrtg/run/mrtg /home/matija/mrtg/mrtg-squid-snmp.cfg
indexmaker mrtg-squid-snmp.cfg "Squid SNMP variables" "." > ~/www/cache/index.html
Change $db_file_location, $MrtgServer, $DBLocation, $client_location,$cache_host, $cache_port.
Change $DBLocation
Watch squid/logs/access.log as you access the cache manager to learn the URL of the page you are interested in.
Feed the url of the page to mkmatch
Scan the mkmatch output to find the right regular expression, and copy it into cstats-s12.
Edit mrtg-squid-cachemgr.cfg
Run indexmaker