Re: [squid-users] Alerting when cache Peer is used.

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 17 Sep 2010 23:31:55 +1200

On 17/09/10 23:14, GIGO . wrote:
>
> I have configured my proxy servers in two regions for backup internet path of each other by declaring the following directives.
>
> Directives on Proxy A:
>
> cache_peer A parent 8080 0 proxy-only
> prefer_direct on
> nonhierarchical_direct off
> cache_peer_access A allow all
>
>
> Directives on Proxy B:
>
> cache_peer B parent 8080 0 proxy-only
> prefer_direct on
> nonhierarchical_direct off
> cache_peer_access B allow all
>
>
> Is there a way that whenever a peer cache is used an email alert is generated to the admins.
>

Not from Squid. That is a job for network availability software.

You could hack up a script to scan squid access.log for the peer
hierarchy codes (DIRECT or FIRST_UP_PARENT etc) being used.

Note that the setting is only "prefer" _direct. It can go to the peer
with perfectly working network access if the origin web server simply
takes too long to reply to a connect attempt.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.8
   Beta testers wanted for 3.2.0.2
Received on Fri Sep 17 2010 - 11:32:01 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 20 2010 - 12:00:03 MDT