Alert on certain error like 503

Geoff Simmons geoff at uplex.de
Thu Jun 16 14:45:25 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/16/11 01:43 PM, Shibashish wrote:
> 
> 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.

If you just want to know that 503s are happening at all, you can monitor
varnishlog for "NNN TxStatus c 503", although that won't tell you which
URL got the 503.

For that, it gets a bit tricky, you'd have to first watch for "NNN RxURL
c /some/path", and then watch for "NNN c TxStatus" with the same NNN,
emitting an alert for 503 and forgetting the URL otherwise.

At any rate, monitoring the varnishlog is the way to do this, we
wouldn't the Varnish demon itself to start sending email.


Best,
Geoff
- -- 
** * * UPLEX - Nils Goroll Systemoptimierung

Schwanenwik 24
22087 Hamburg

Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753

http://uplex.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJN+frlAAoJEOUwvh9pJNURn9EP/RxjFK2y8CsrRTcU6MX3E8lQ
KbZrF5zCoOC40uLShdVmRSQpugMYfJG30+iSwcqea+mLaavlQQCO1i3WkAc5SEfh
hFkz/W/vkqFG1ssAmvgxSA+SE0VH0wns7bbkiifGcYktzFumouchcjxpWLXegFyZ
vGj4V3H7v4kv0dUIdnxYT5TcZKPRiZg3HEyF8TjyAz2X1ry0snfgLHQrQIctReh1
y5rlmCWxIZOZaX36VKT2I0IVy55+mwaYpYXE9POYR9iMUbZtMcB1OGAAOQfANa86
CPsSKE/+AmvlX0if6qM76Fl0kLxAHJu8UgoylBXtmf8n82QXqzp3Uad5g5+5zfp1
3FceOk575rRbH/FhxXW/ZebsisUULaTX2X0orsKy+2E70Mm9rYFuWCyrMgb1BZqM
sqyApUj7MECBSGow3kunp0dHa7MOaKHgtq/oIRm8ji6owG+yfro/ndw/Ek+xUtJY
vA+VK+9rQuf/LpEgv2YcA7nfsSS50rZAHZ+as3PSO6w6Alfa8LPsVOIDByM0RV7a
naQkQi4/qbOM/CBTuR86TqvspXUeRyUgsjO5F9Rqn3i8ADzr18+wS04EVUY1LW29
lgPGe95OJUrAbxwuoKBxL/rMPQSj2UZ8Lqap+2qnaLWCjWvj5kfYGS5O+UL+adjE
BqX2nKhmv1zevfpV40vk
=vyPY
-----END PGP SIGNATURE-----




More information about the varnish-misc mailing list