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 
> <[email protected]>:
> 
>> 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 <[email protected]> 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
>> [email protected]
>> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>> 
>> 
>> 
>> -- 
>> Jonathan M. Hursey
>> Linux Systems Administrator
>> 
>> 
>> 
>> _______________________________________________
>> varnish-misc mailing list
>> [email protected]
>> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> _______________________________________________
> varnish-misc mailing list
> [email protected]
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to