debugging varnish with vlc_error

Samuele Giovanni Tonon samu at linuxasylum.net
Fri Dec 23 14:19:17 CET 2011


hello,

i need to do some deep analysys on how varnish is acting on our
production environment.

thanks to some previous email in the list, i was able to send to
syslog some information.
i have some questions: does this configuration is useful to trace
guru meditation ? if not do you have any advice?

I would like also to print the hostname of the backend which is replying
with the problem; the only thing i was able to come close is
req.backend but this just print the name of the director and not the
backend name nor the backend ip; any idea ?

for  example at the moment i'm getting :

Dec 23 14:18:20 isvar01 varnishd[1893]: V Err '/' 'Service Unavailable'
'2011782056' [www.myhost.net] {director_islig}



here's my configuration: i'm running varnish varnish-3.0.2-1.el5.x86_64
on centos.


sub vcl_error {
  if (obj.status >= 500) {
    std.syslog(180, "V Err '" + req.url + "' '" + obj.response + "' '" +
req.xid + "' [" + req.http.host + "] {" + req.backend  + "}" );
  }
}

req.backend prints the name of my director which is configured
as follow:

director director_islig round-robin {
        {
         .backend = islig01_local;
        }
        {
         .backend = islig02_local;
        }
        {
         .backend = islig03_local;
        }
        {
         .backend = web102;
        }
        {
         .backend = web103;
        }
 }
backend web103 {
        .host = "192.168.1.13";
    .probe = {
         .url = "/";
         .interval = 60s;
         .timeout = 10 s;
         .window = 5;
         .threshold = 1;
    }
 }



Many thanks

Samuele



More information about the varnish-misc mailing list