Alert on certain error like 503

Adrian Lienhard adi at netstyle.ch
Fri Jun 17 11:10:25 CEST 2011


What we do is to write to syslog:

C{ #include <syslog.h> }C
...
sub vcl_error {
	C{ syslog(LOG_ERR, "Varnish vcl_error"); }C
	...
	return(deliver);
}

Cheers,
Adrian

On Jun 17, 2011, at 02:26 , Audun Ytterdal wrote:

> I actually just have a Custom errorpage with javascript that post all relevant info from the client to a phpscript. That phpscript could easily have logic for
> Sending mail
> 
> Den 16. juni 2011 kl. 07:18 skrev Jonathan Hursey <jonathan.hursey at adrevolution.com>:
> 
>> I have varnishncsa writing to a log file and a shell script that greps out all 5XX errors then reports via Nagios if they exceed a certain number. 
>> 
>> On Thu, Jun 16, 2011 at 6:43 AM, Shibashish <shib4u at gmail.com> wrote:
>> Hi,
>> 
>> Can varnish be made to send out an alert (mail) in case of an error like 503? I do have a monitoring solution but i can't add all the urls for monitoring. Sometimes varnish gives a 503 and i need to be alerted during that time.
>> 
>> Another option can be to keep looking for 503 errors. log them as they occur and keep watching that file.
>> 
>> ShiB.
>> while ( ! ( succeed = try() ) );
>> 
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>> 
>> 
>> 
>> -- 
>> Jonathan M. Hursey
>> Linux Systems Administrator
>> 
>> 
>> 
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc





More information about the varnish-misc mailing list