varnish and logging

Timothy Ball timball at gmail.com
Sun Apr 20 19:25:58 CEST 2008


I have a pretty basic setup w/ varnish load balancing infront of apache.

The problem I am experiencing is that the apache logs themselves seem
*really* off (hit rates are nearly one order of magnitude low). So I
examined the varnishlog(1) man pages...

Does anyone have a script that takes varnishlog output and munges it into
something that looks combinedlog-ish? Queries to google-tube have not been
useful.

Just for completeness my configs look like this:

--snip--snip--snip--
# blatantly ripped off from supplied example++
backend default {
        set backend.host = "10.80.80.252";
        set backend.port = "8080";
}
sub vcl_recv {
    if (req.url ~
"\.(css|js|jpg|JPG|png|gif|ico|mov|flv|swf|feed|atom|rss2)") {
        lookup;
    }


    if (req.url ~ ".trackback.") {
        error 503 "Request type not allowed.";
    }

}
sub vcl_pass {
        pass;
}
sub vcl_hash {
        set req.hash += req.url;
        set req.hash += req.http.host;
        hash;
}
sub vcl_hit {
        if (!obj.cacheable) {
                pass;
        }
        deliver;
}
sub vcl_miss {
        fetch;
}
sub vcl_fetch {
        if (!obj.valid) {
                error;
        }
        if (!obj.cacheable) {
                pass;
        }
        if (obj.http.Set-Cookie) {
                pass;
        }
        insert;
}
sub vcl_deliver {
    deliver;
}
sub vcl_timeout {
        discard;
}
--snip--snip--snip--

TIA,
--timball

-- 
GPG key available on pgpkeys.mit.edu
pub 1024D/511FBD54 2001-07-23 Timothy Lu Hu Ball <timball at tux.org>
Key fingerprint = B579 29B0 F6C8 C7AA 3840 E053 FE02 BB97 511F BD54
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20080420/6eac2586/attachment.htm 


More information about the varnish-misc mailing list