Angelo's email address isn't valid anymore, so here's a patch against 2.1.5
for anyone interested in some extra fields.

The patch adds three fields to the end of the log line if you provide the -e
switch to varnishncsa:

   - long: Age in seconds
      - A 0 value doesn't necessarily mean it was a miss.
   - long: Hits; requires X-Hits header to be added in vcl_deliver():
      - set resp.http.X-Hits = obj.hits;
      - This doesn't seem to be available in the log, otherwise.
      - A 0 value means it was a miss.
   - float: Response time in seconds (resp-req)

Not heavily tested, v1.0, YMMV, etc., but it seems fine under load and
doesn't seem to leak.

I think adding LogFormat functionality (per the TODO) is the better
implementation, but that's outside the scope of my free time. ;)
-- 
kb



On Wed, Nov 3, 2010 at 07:10, Angelo Höngens <[email protected]> wrote:

> >> -----Original Message-----
> >> From: [email protected] [mailto:varnish-misc-
> >> [email protected]] On Behalf Of Angelo Höngens
> >> Sent: vrijdag 8 oktober 2010 13:35
> >> To: 'Varnish-misc'
> >> Subject: RE: response time in varnishncsa
> >>
> >> Havent seen anything on the list about this. I would also really like
> >> to see the time-taken field in the varnishnca log. And what I would
> >> want even more, is a field indicating hit/miss! I might even convince
> >> my boss to pay for the hours taken.
> >
> > -----Original Message-----
> > From: Angelo Höngens
> > Sent: zaterdag 23 oktober 2010 17:41
> > To: 'Poul-Henning Kamp ([email protected])'
> > Subject: RE: response time in varnishncsa
> >
> > Poul-Henning,
> >
> > Just a quick question off-list: I really want the extra feature below
> > (2 extra fields in varnishncsa output).
> >
> > Would you be willing to do this for pay? I'm pretty sure I can get my
> > employer to pay for this feature. Don't know if you have any time, or
> > how many hours it would take you, but I was thinking about some fixed
> > price based on an initial estimate of your hours?
> >
> > Please let me know..
>
>
> Since PHK is not responding, is there anyone else that's interested in
> making a buck on this?
>
>
> --
>
>
> With kind regards,
>
>
> Angelo Höngens
>
> Systems Administrator
>
> ------------------------------------------
> NetMatch
> tourism internet software solutions
>
> Ringbaan Oost 2b
> 5013 CA Tilburg
> T: +31 (0)13 5811088
> F: +31 (0)13 5821239
>
> mailto:[email protected]
> http://www.netmatch.nl
> ------------------------------------------
>
>
>
> _______________________________________________
> varnish-misc mailing list
> [email protected]
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc

Attachment: varnishncsa_ext.patch
Description: Binary data

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

Reply via email to