[squid-users] squidclient parsing

Francesco Chemolli gkinkie at gmail.com
Thu Dec 7 22:25:06 UTC 2017



> On Dec 7, 2017, at 21:56, John Refwe <johnrefwe at mail.com> wrote:
> 
> Hi!
Hi John
 
> I am trying to automate using certain statistics from the squidclient. I had two questions.
>  
> 1) Is it possible to ask squid to respond in a different format than the text dump it currently gives back? For example, JSON or XML response

An effort to add multi-format output has been stared a few years back; it failed to deliver any useful results.

> 2) If the answer to number 1 is no, are there any recommendations for how to parse the response?

Responses are formatted, and they require relatively little context for interpretation. It depends on what you need to do, really.

> 2) Are there any off the shelf tools/libraries (like cURL or python requests library) that are able to use the squid_cache:// protocol?

Recent squid versions also offer cachemgr output on http:// protocol. IIRC you need to request http://name.of.squid.server/squid-internal-mgr/<page> <http://name.of.squid.server/squid-internal-mgr/%3Cpage%3E> 
The cache_object:// protocol is HTTP anyway.

HTH,
  Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171207/755dd0a5/attachment-0001.html>


More information about the squid-users mailing list