Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to monitor SQUID hit ratio with MRTG (use cgi on apache)

Posted on 2010-08-30
9
Medium Priority
?
1,917 Views
Last Modified: 2013-12-20
:   Hi everyone,

I have installed squid as cache server and also apache on that server. I am looking for an instruction for configuring squid and apache to enable me to monitor hit ratio of squid.
I installed squid 2.6 with snmp enabled option on CentOS linux.
I assume that I should configure apache and use a cgi to monitor the hit ratio in squid and also I should configure the squid to allow the apache to get information through snmp. actually I don't know to configure them and couldn't find a source to help for this configuration.

could anyone help me how to configure them.
0
Comment
Question by:kermanian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 33564254
Did you configure squid to listen and respond on the SNMP?
Check the configuration for SNMP.
There is the port definition, the community and the access.
/etc/squid/squid.conf
acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow reaslsquid localhost
snmp_access deny all

You can replace localhost with the IP of the server where cacti is installed.
You can/should change the community from public to something else if you wish.

You could then setup cacti from cacti.net. and add the templates you need/want
http://docs.cacti.net/templates
You would need to import the template/s you want.
0
 
LVL 79

Expert Comment

by:arnold
ID: 33564656
0
 
LVL 1

Author Comment

by:kermanian
ID: 33580934
I have done the following activities:
1 - configure the squid for snmp
    acl snmppublic snmp_community public
    snmp_port 3401
    snmp_access allow reaslsquid localhost
    snmp_access deny all
2 - test the snmp by using the snmpwalk tool and it is working
3 - install httpd
4 - install mrtg

now I don't know how to configure cfg and show the result of mrtg on a graph
may you please help for this problem.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 79

Expert Comment

by:arnold
ID: 33581255
You need to make sure the Acl and the snmp_access use the same acl name.
YOu also need to uncomment the binding for snmp

You need configure the OID in the target to poll for each .

did you run snmpwalk -v 2c -c public <ip>:3401 OID?

0
 
LVL 1

Author Comment

by:kermanian
ID: 33614537
I have checked the snmpwalk and it is OK.
I have already configured the ACL and snmp_access

the problem is about setting the mrtg itself. and cfg file. I don't know how to configure the mrtg to present the data of snmp whoch is obtained from squid.

0
 
LVL 79

Expert Comment

by:arnold
ID: 33617447
http://www.visolve.com/squid/whitepapers/monitoringsquid.php
Squid MIB for reference:
http://www.oidview.com/mibs/3495/SQUID-MIB.html

You add the OID of the squid SNMP for requests, hits as the target in the mrtg.conf file for squid TThis will be the hit count.
Target[squid]: 1.3.6.1.4.1.3495.1.3.2.1.2:public@mydevice:3401
0
 
LVL 79

Expert Comment

by:arnold
ID: 33740578
All the information and references provided change the configuration of squid to respond to SNMP queries.
If you want to clarify what you are looking for, please do.  The answer to the question on how to configure squid for monitoring using SNMP is here.  Reference to the mrtg configuartion as well as an alternative cacti that could monitor other devices/application that you may have but have not considered.

0
 
LVL 1

Accepted Solution

by:
kermanian earned 0 total points
ID: 33751906
I could configure what I wanted with the help of all comments and some more search in internet. I have prepared the instruction and upload it.

hope it would be useful for everybody.

thanks for all helps and comments

Use-MRTG-to-Monitor-SQUID.pdf
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
The viewer will learn how to count occurrences of each item in an array.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question