[SOLVED] squidclient



  • Tested with squid3-dev 3.3.10 pkg 2.2.1 & 2.2.2

    I wanted to use squidclient for viewing delay_pools monitoring:

    squidclient mgr:delay | less
    

    I had to indicate my LAN address because I haven't activated squid for localhost address:

    squidclient -h 192.168.0.1 mgr:delay | less
    
    squidclient -h 192.168.0.1 cache_object://delay
    
    http://192.168.0.1:3128/squid-internal-mgr/
    

    However, I got a denied response. Here is the beginning of the header:

    HTTP/1.1 403 Forbidden
    Server: squid/3.3.10
    Mime-Version: 1.0
    Date: Tue, 08 Apr 2014 11:58:12 GMT
    Content-Type: text/html
    Content-Length: 3260
    X-Squid-Error: ERR_ACCESS_DENIED 0
    

    squidclient is working correctly because if I put something like:

    squidclient -h 192.168.0.1 http://www.google.com
    

    I got the page.

    I think I need some more permission at squid.conf, but I can't see which one.

    Related pages I found

    http://wiki.squid-cache.org/action/show/Features/CacheManager?action=show&redirect=SquidFaq%2FCacheManager#Cache_manager_access_from_squidclient

    http://www.linuxcertif.com/man/1/squidclient/

    https://forum.pfsense.org/index.php?topic=30057.0

    https://redmine.pfsense.org/issues/114

    Google squidclient pfsense

    Google monitoring delay pools



  • https://github.com/pfsense/pfsense-packages/blob/master/config/squid3/33/squid_ng.xml

    squid_ng.xml have code related to activate cachemgr.cgi but I can't find this option at the WebGUI.



  • Adding LAN Address to Proxy server: Cache management: External Cache-Managers permits to work with squidclient

    [2.1-RELEASE][admin@pfsense.localdomain]/usr/local/pkg(11): squidclient -h pfsense.localdomain mgr:delay 
    HTTP/1.1 200 OK
    Server: squid/3.3.10
    Mime-Version: 1.0
    Date: Tue, 08 Apr 2014 17:26:13 GMT
    Content-Type: text/plain
    Expires: Tue, 08 Apr 2014 17:26:13 GMT
    Last-Modified: Tue, 08 Apr 2014 17:26:13 GMT
    X-Cache: MISS from localhost
    X-Cache-Lookup: MISS from localhost:3128
    Via: 1.1 localhost (squid/3.3.10)
    Connection: close
    
    Delay pools configured: 1
    
    Pool: 1
    	Class: 2
    
    	Aggregate:
    		Disabled.
    
    	Individual:
    		Disabled.
    
    Memory Used: 1500 bytes
    


  • Display the menu

     squidclient -h pfsense.localdomain mgr:
    

    Display redirector statistics

    [2.1-RELEASE][admin@pfsense.localdomain]/usr/local/pkg(23): squidclient -h pfsense.localdomain mgr:redirector
    HTTP/1.1 200 OK
    Server: squid/3.3.10
    Mime-Version: 1.0
    Date: Tue, 08 Apr 2014 17:31:13 GMT
    Content-Type: text/plain
    Expires: Tue, 08 Apr 2014 17:31:13 GMT
    Last-Modified: Tue, 08 Apr 2014 17:31:13 GMT
    X-Cache: MISS from localhost
    X-Cache-Lookup: MISS from localhost:3128
    Via: 1.1 localhost (squid/3.3.10)
    Connection: close
    
    Redirector Statistics:
    program: /usr/pbi/squidguard-squid3-i386/bin/squidGuard
    number active: 8 of 16 (0 shutting down)
    requests sent: 162
    replies received: 161
    queue length: 0
    avg service time: 0 msec
    
          #	     FD	    PID	 # Requests	  # Replies	Flags	   Time	 Offset	Request
          1	     35	  21817	        138	        137	B   	  0.025	      1	(none)
          2	     38	  21850	          9	          9	    	  0.000	      0	(none)
          3	     40	  22029	          3	          3	    	  0.001	      0	(none)
          4	     50	  22108	          0	          0	    	  0.000	      0	(none)
          5	     52	  22275	          0	          0	    	  0.000	      0	(none)
          6	     54	  22309	          0	          0	    	  0.000	      0	(none)
          7	     56	  22602	          0	          0	    	  0.000	      0	(none)
          8	     58	  22846	          0	          0	    	  0.000	      0	(none)
    
    Flags key:
    
       B = BUSY
       W = WRITING
       C = CLOSING
       S = SHUTDOWN PENDING
    


  • Sticky thread about Monitor Squid Status, https://forum.pfsense.org/index.php?topic=28835.0


 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy