Re: [squid-users] cacti?

From: Karl R. Balsmeier <karl@dont-contact.us>
Date: Thu, 01 Mar 2007 15:31:59 -0800

basically you have to set your system up like this:

#####
SQUID:
In addition to special snmpd.conf configuration covered elsewhere, you
need to edit the squid.conf, as follows:

acl snmppublic snmp_community click
snmp_port 3401
snmp_access allow snmppublic localhost

The ACL is for localhost, since Cacti queries snmpd, which then proxies
the request to localhost.

After adding these lines, you can avoid a restart by issuing the
following to the main squid executable:

squid -k parse
squid -k reconfigure

SNMP for squid requires a compile option. Modern RPM packages seem to
have it enabled out the box.

###########
SNMP Guidelines:
/etc/snmp/snmpd.conf

If you dont have it, you can install net-snmp via yum, which I had to do
on my centos machine to get a workable snmpd.conf going.

* add or edit snmpd.conf:
com2sec notConfigUser 192.168.100.0/24 your_community_name_here
(your_community_name_here designates the SNMP community name, just use
one word)
(your internal IP range and /block -I gave a fake one for an example,
just put your internal network)

* add systemviews. Not all lines are necessary on all servers:

view systemview included .1.3.6.1.2.1.2
(for Ethernet interfaces)
view systemview included .1.3.6.1.4.1.2021
(for disk space checks)
view systemview included 1.3.6.1.4.1.3495
(for Squid checks)

* for Squid and Java, it's also necessary to proxy squid connections.
Squid / Java listens to SNMP requests on port 3401, which Cacti doesn't
work well with.

proxy -c your_snmp_community_name_here -v 2c localhost:3401
.1.3.6.1.4.1.3495.1 # squid

All of the above goes, in order of occurrence, into snmpd.conf.

#######
Test it out:

After restarting Squid or -k parse and -k configure, you can do a
netstat -an|grep :3401 to make sure there's a listener running for SNMP
request.

You can also tail -f /var/www/cacti/log/cacti.log | grep
your_machine_name to see your target machine and if it's showing up
during the 5 minute polls.

#########
XML Template
As far as the Squid XML Template, my co-worker did most of the uploading
of it, and configuration, so i'll figure all of that out. Basically we
grabbed the Squid XML template from the online cacti forum, i'll go
check it's name out and see if I can export it to you so you guys can
see squid in action. We truly depend on this metric, it shows when we
have to add new cachers.

-karlski

Adrian Chadd wrote:

>On Thu, Mar 01, 2007, Karl R. Balsmeier wrote:
>
>
>>yep, we are tracking squid via snmp/cacti, and I can give you a full
>>description of exactly what you'd need to do to get it to work. It's
>>easy. I run it on centos (squid).
>>
>>
>
>Yes please!
>
>
>Adrian
>
>
>
Received on Thu Mar 01 2007 - 16:32:35 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 31 2007 - 13:00:01 MDT