Wish ===== squid-graph is an old, unmaintained Perl tool that parses Squid's access.log every five minutes and has its own translation handling. The plan was to replace it with a telemetryd source so that the proxy shows up in the new web UI (requests, traffic, hit ratio, errors) and its strings go through the normal translation process. Requirements: * Cover at least what squid-graph covers * No log parsing * No configuration in telemetryd (we do not want to carry a proxy port setting) * Work with old and new versions of Squid (the cache manager tools are being removed) * Preferably just call a command and parse its output Investigation ============= Command line: * squid has no command that prints statistics. Its options (-k reconfigure, -k rotate, ...) only signal the running daemon. * squidclient (mgr:counters) was the tool for this, but it has been removed in Squid 7. The release notes list the removal of squidclient, of cachemgr.cgi and of the cache_object: URI scheme, and say that curl/wget should be used instead. Cache manager over HTTP: * Still works in Squid 7. Built Squid 7.8 locally with the default squid.conf: GET /squid-internal-mgr/counters on the HTTP port returns client_http.requests, client_http.hits, client_http.errors, client_http.kbytes_in/out, server.all.* and so on. The default rule "http_access allow localhost manager" is sufficient. * Problem: this is only reachable over TCP on whatever http_port is configured. The port is not fixed (IPFire makes it configurable). UNIX socket (as we do for knot-resolver): * Squid 7.8 does not offer one. "http_port /path" aborts with "FATAL: http_port: missing Port", no UNIX listener shows up in ss -xlp, and the only AF_UNIX code in the source (ipc.cc, UdsOp.cc) is for communication between Squid's own worker processes. * Nothing in the directive documentation or the Squid 7 release notes mentions a UNIX socket for HTTP or the cache manager. Other ways to learn the port or get the data: * Parsing squid.conf: fragile and a bad idea. * Probing listening ports in /proc/net/tcp: guessing. * Mapping Squid's own socket through /proc/<pid>/fd: needs CAP_SYS_PTRACE, which conflicts with running telemetryd unprivileged. * SNMP: needs snmp_port and an ACL in squid.conf, plus a client dependency. * access.log: this is what squid-graph does, and what we wanted to avoid. Result ====== Every option needs Squid's port or configuration to be known to telemetryd, and Squid offers no stable, configuration-free interface (command, UNIX socket) for its statistics. Closing as CANTFIX. Should Squid ever grow a UNIX socket or a fixed, always-on manager listener, or should IPFire's generated squid.conf pin a dedicated manager-only listener (for example http_port 127.0.0.1:<fixed port>), the source is simple to write: fetch /squid-internal-mgr/counters once per interval, parse the key = value lines and store them as counters.