Solved

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

Posted on 2010-08-30
9
1,875 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 78

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 78

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
Independent Software Vendors: 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 78

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 78

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 78

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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