squidclient parsing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

squidclient parsing

John Refwe
Hi!
 
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
2) If the answer to number 1 is no, are there any recommendations for how to parse the response?
2) Are there any off the shelf tools/libraries (like cURL or python requests library) that are able to use the squid_cache:// protocol?
 
Best,
 
John

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squidclient parsing

Kinkie


On Dec 7, 2017, at 21:56, John Refwe <[hidden email]> 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> 
The cache_object:// protocol is HTTP anyway.

HTH,
  Francesco

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users