This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Readout Squid's MIB Variables via SNMP?

Using v5.0xx, so far, I was not successful in reading out Squid's MIB variables via SNMP from port 3401/udp, even though I think that I have enabled everything which is needed for snmpget in /var/storage/chroot-squid/etc/squid.conf-default, and also added a filter rule accordingly.

How can I check if Squid was indeed built with the --enable-snmp option?
Did you manage to read any MIB variables from Squid by SNMP?

I try to graph externally the performance of Squid file cache (hit rates, number of cached objects). These graphs are important in my ASL application, but they were dropped in the move from v4 to v5.

Thanks for any hints,
Rolf


This thread was automatically locked due to age.
  • I am still/again interested in getting Squid performance graphs back that we had in v4.x - in the mean time we are at 5.102...

    So I tried to get the SquidStats plusgin working in Cacti, see the following thread for details
     SquidStatsInCacti

    Even after applying the trick with the additional line

    proxy -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1

    in /var/storage/chroot-squid/etc/squid.conf(-default) and restarting Squid, snmpwalk still does not return any OID at .1.3.6.1.4.1.3495

    Can anyone (from Astaro?) confirm that Squid was compiled with the configure option --enable-snmp in ASL v5.102?  I have not found any way yet how to confirm this myself, and would like to have some assertion before I invest more time debugging. Thanks.

    In return, once I should get the graphs going, I would offer a howto for those who also like to have Squid performance graphs back  [:)]

    Rolf
  • Oops, I obviously got it wrong there in my first approach. The proxy line should of course go into /var/chroot-snmp/snmpd.conf, and not into squid.conf(-default).

    There is the next problem: /var/chroot-snmp/snmpd.conf is not persistent and my proxy line gets overwritten once the snmpd is restarted using the Web interface. Is there a snmpd.conf-default file where I should place the proxy line instead?

    Rolf
  • After I added the proxy line to snmpd.conf, I just sent the snmpd process a "kill -1" signal in order to trigger a reload of its snmpd.conf file.
    Still, snmpwalk does return not any Squid objects :-(

    Either there is some ACL in squid.conf blocking my access, or there is indeed no snmp support compiled into Squid (configure --disable-snmp).

    Rolf
  • I am now pretty sure that Squid was compiled without --enable-snmp, unfortunately (see below).

    Astaro, could you please give us SNMP support by compiling Squid with --enable-snmp in one of the next Up2date? This would allow us to reconstruct ourselves the cache performance graphs that you provided in ASLv4?


    I modified /var/mdw/scripts/squid to write at squid.out log file:
    #      chroot /var/chroot-squid $WRAPPER -sYD >/dev/null 2>&1 || ret_code=1
          chroot /var/chroot-squid $WRAPPER -sYD >> /var/log/squid/squid.out  2>&1 || ret_code=1

    After I added to /var/storage/chroot-squid/etc/squid.conf-default

    acl snmppublic snmp_community public
    snmp_access allow snmppublic localhost
    #snmp_access deny all
    snmp_access allow all
    snmp_port 3401

    and to /var/chroot-snmp/etc/snmpd.conf
    proxy -v 1 -c public localhost:3401 .1.3.6.1.4.1.3495.1


    Then restarted Squid:
    /var/mdw/scripts/squid restart

    Thereafter /var/log/squid/squid.out shows:

    2005/02/13 08:43:06| squid.conf line 5: acl snmppublic snmp_community public
    2005/02/13 08:43:06| aclParseAclLine: Invalid ACL type 'snmp_community'
    2005/02/13 08:43:06| parseConfigFile: line 6 unrecognized: 'snmp_access allow snmppublic localhost'
    2005/02/13 08:43:06| parseConfigFile: line 8 unrecognized: 'snmp_access allow all'
    2005/02/13 08:43:06| parseConfigFile: line 9 unrecognized: 'snmp_port 3401'

    Which finally provides evidence that SNMP support is missing Squid of ASL5.102

    Rolf
  • Astaro support replied that they won't compile Squid with --enable-snmp for v5.x.  So we can only hope this option will be compiled in at least in v6 again.

    Rolf