RE: mrtg versus squid

From: Jeff Madison <jeff@dont-contact.us>
Date: Thu, 14 Jan 1999 14:39:41 -0700

I have been fighting for days to get SNMP to work with squid. I was getting
the same messages as you and it's because squid/SNMP is not responding. I
used snmpwalk to test. If you look hard enough you will find you have a
problem with your SNMP config in the squid.conf. Here is what I ended up
with in my conf file. Most of it is already in the file you just have to
uncomment the lines. You also have to uncomment the line the defines 'all'
acl.

snmp_port 3401

acl snmpmanagementhosts src xxx.xxx.xxx.xxx/255.255.255.0
xxx.xxx.xxx.xxx/255.255.255.0
snmp_mib_path /usr/local/squid/etc/mib.txt

snmp_agent_conf view all .1.3.6 included
snmp_agent_conf view squid .1.3.6 included
snmp_agent_conf user squid - all all public
snmp_agent_conf user all all all all squid
snmp_agent_conf community public squid squid
snmp_agent_conf community readwrite all all

snmp_acl public deny all !snmpmanagementhosts
snmp_acl readwrite deny all

snmp_incoming_address xxx.xxx.xxx.xxx

I also had to totally restart squid to get these changes to take effect,
just doing a 'squid -k reconfigure' would no do it.

Jeff Madison
Systems Engineer
(801)924-0900 x 101

-----Original Message-----
From: Alexandre Almeida Wanderley [mailto:aaw@ds.rei.br]
Sent: Thursday, January 14, 1999 1:56 PM
To: squid-users@ircache.net
Subject: mrtg versus squid

       Hi, all

       I'm trying to run mrtg-2.5.4b to monitor our cache, but some errors
are
returning from mrtg, and I don't know where to start to fix them. See:
        I have compiled squid-2.1.PATCH2 with --enable-snmp and I configured
squid.conf as well the FAQ says. I also have applied the squid patch to mrtg
and
defined port 3401 in mrtg.conf as follows:
Target[httpsvc]: cacheHttpAllSvcTimeFiveMin&cacheHttpAllSvcTimeFiveMi
n:public@xxx.xxx.xxx:3401
        Every line where there is a public@xxx.xxx.xxx, I put the :3401
entry.
        Squid stars so smootly, everything goes ok...:
        .
        .
        .
        1999/01/14 16:11:44| Accepting HTTP connections on port 3128, FD 6.
        1999/01/14 16:11:44| Accepting HTTP connections on port 3128, FD 6.
        1999/01/14 16:11:44| Accepting ICP messages on port 3130, FD 15.
        1999/01/14 16:11:44| Accepting SNMP messages on port 3401, FD 16.
        1999/01/14 16:11:44| Ready to serve requests.

        But, when I try to start mrtg (it is (will be) running just to
monitor
the cache), a lot of the following block lines return to me:

        (Sorry... I must put xxx.xxx.xxx and 000.000.000.00 to the machine's
        name and IP address.)

SNMPv1_Session (remote host: "xxx.xxx.xxx" [000.000.000.00].3401
                  community: "public"
                 request ID: 327354413
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
SNMPGET: Failed to reach target: "cacheICPpktsSent&cacheICPpktsSent:public@
xxx.xxx.xxx:3401". I tried multiple times!
SNMP Error:
no response received
SNMPv1_Session (remote host: "xxx.xxx.xxx" [000.000.000.00].3401
                  community: "public"
                 request ID: 1400477190
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
SNMPGET: Failed to reach target: "cacheHttpInKb&cacheHttpInKb:public@
xxx.xxx.xxx:3401". I tried multiple times!

        And, at the end, the line: Unknown SNMP var cacheServerOutKb.
        Could anybody tell me what am I doing wrong or what I didn't do yet?

        Thankyou your attention

        Alexandre Almeida
Received on Thu Jan 14 1999 - 14:41:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:44:02 MST