System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

where should I check to monitor logs of squid using mrtg

 
Maaz
Valued Contributor

where should I check to monitor logs of squid using mrtg

in squid.conf

acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic all
# squid -k recon

installed mrtg, then ran
# ./cfgmaker --global 'WorkDir: /home/httpd/mrtg' --global 'Options[_]: bits,growright' --output /home/httpd/mrtg/mrtg.cfg public@10.0.0.110
then mib.txt from squid directory to mrtg directory as
# cp /usr/local/squid/share/mib.txt /usr/local/mrtg-2/mibs/squid.mib

then add a line in mrtg.cfg
LoadMIBS: /usr/local/mrtg-2/mibs/squid.mib

then in cron
*/5 * * * * /usr/local/mrtg-2/bin/mrtg /home/httpd/mrtg/mrtg.cfg

Now what should I do, how can I check the log/traffic-graph of squid.. should I have to config the Apache too.
Plz help
Regards
Maaz
8 REPLIES
Ivan Ferreira
Honored Contributor

Re: where should I check to monitor logs of squid using mrtg

Yes, create an Alias and point it to /home/httpd/mrtg, use indexmaker to generate the index page.

If you want to monitor squid, see also srg or sarg.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Krastev
Honored Contributor

Re: where should I check to monitor logs of squid using mrtg

Another good choice is to use cacti. See how to configure - http://gentoo-wiki.com/Cacti/Squid_Setup


regards,
ivan
Maaz
Valued Contributor

Re: where should I check to monitor logs of squid using mrtg

Thanks Ivan Ferreira
>Yes, create an Alias and point it to /home/httpd/mrtg, use indexmaker to >generate the index page.
hmmm... if u can plz explain a bit more...(excuze me i m so dumb ;( ) i.e plz write me the syntax
>If you want to monitor squid, see also srg or sarg
Ok, I must try sarg

Thanks Ivan Krastev
>Another good choice is to use cacti. See how to configure - > http://gentoo-wiki.com/Cacti/Squid_Setup
Thanks for suggestion.. I will try cacti too.
Maaz
Valued Contributor

Re: where should I check to monitor logs of squid using mrtg

ooopppss, I didnt noticed, when I ran cfgmaker, I got the errors, file attached.
even though I have ran the following commands, before running cfgmaker
# /etc/init.d/snmpd start
# chkconfig snmpd on
Stuart Browne
Honored Contributor

Re: where should I check to monitor logs of squid using mrtg

Umm, you want to query the SNMP server running on port 3401 to get the squid stats..
One long-haired git at your service...
Maaz
Valued Contributor

Re: where should I check to monitor logs of squid using mrtg

> ooopppss, I didnt noticed, when I ran cfgmaker, I got the errors, file attached

I found the sol... before running cfgmaker, I ran snmpconf, then I ran cfgmaker...and this time no errors... (and all the setting above).
Ok, I can see html files in /home/httpd/mrtg, but these files are not the squid logs, but logs of overall bandwith/traffic that passes from the machine(squid server).

Squid is doing fine, i.e sqid is providing snmp, because when I ran
# snmpwalk -c communityname -v1 127.0.0.1:3401 .1.3.6.1.4.1.3495.1
i got the whole bunch of lines

Maaz
Valued Contributor

Re: where should I check to monitor logs of squid using mrtg

Dear Stuart Browne thanks for reply/help
> Umm, you want to query the SNMP server running on port 3401 to get the >squid stats
HOW ?

Stuart Browne
Honored Contributor

Re: where should I check to monitor logs of squid using mrtg

With CFGMaker and MRTG, you specify the port number in the SNMP Options.
One long-haired git at your service...