Search squid archive

Re: how to check the health of squid server?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ying lcs wrote:
Hi,

How to check the health of squid server?
I am thinking about writing a script to connect to squid ip address
with port 3128.
But is that enough?
And what should i expect to receive? Is there some kind of 'ping'
command for squid?

Thank you.

Here's a (very) quick and (very) dirty script* (using wget) that will verify the server is responding to requests:

++++++++++++++
#!/bin/sh
export http_proxy=http://my.proxy.server:3128/

/usr/bin/wget -q -O /dev/null http://some.url/
if [ $? ] ; then
 # Proxy's working.
else
 # Proxy's broke.
fi
++++++++++++++

Obviously, this must be run from a client that is allowed proxy access. As mentioned, Nagios is a much more robust tool for network monitoring. With Groundwork's Monarch product (http://sourceforge.net/project/showfiles.php?group_id=130574) it's even configurable by a mere mortal. Monitoring the performance of your squid server via Cacti (or some other SNMP query tool) is another good route.

Chris

*This script is untested, and does nothing in either case. Verifying functionality and making it useful is left as an exercise for the reader.

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux