Varnish statistics

Audun Ytterdal ay at vg.no
Tue May 13 14:47:26 CEST 2008


Here is a thought.

We like varnish, we like munin, we like statistics...

Right now it's hard to get information about which backend get what kind
of traffic, how much of your traffic is hindered by cookies and so forth

My tought:

sub vcl_recv {
        set req.grace = 15s;

        if (!req.url ~ "^\/tabkonk/" && !req.url ~ "^\/live\/") {
                inc varcount.tabkonkcookieremove;
                remove req.http.cookie;
        }

       if (req.http.referer ~"^x-gadg") {
               inc varcount.xgadgetblocked;
               error 403 "x-gadget blocked";
       }

        if (req.http.host ~ "^skatt.vg.no$"){
             inc varcount.backendskatt; 
             set req.backend = skatt;
        } elseif (req.http.host ~ "^nyheter.vg.no$"){
                inc varcount.backendnyheter;
                set req.backend = nyheter;

.......
   
This way, probably with a better sounding syntax, you could have
counters for just about anything, and output them them through
varnishstat, and then graph them with munin or similar tool.

Any thoughts?


*****************************************************************
Denne fotnoten bekrefter at denne e-postmeldingen ble
skannet av MailSweeper og funnet fri for virus.
*****************************************************************
This footnote confirms that this email message has been 
swept by MailSweeper for the presence of computer viruses.
*****************************************************************




More information about the varnish-misc mailing list