Re: [squid-users] how to check the health of squid server?

From: Chris Robertson <crobertson@dont-contact.us>
Date: Tue, 14 Aug 2007 10:54:24 -0800

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.
Received on Tue Aug 14 2007 - 12:54:35 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT