reg: not getting ReqAcct tag in varnishlog

Dridi Boukelmoune dridi at varni.sh
Mon Mar 18 19:12:34 UTC 2019


On Mon, Mar 18, 2019 at 5:53 PM Hardik <hetardik.p at gmail.com> wrote:
>
> Hi Dridi,
>
> I am reading few tags for Billing purpose. I have added VMOD for this.In vmod currently I was passing "-g session" option to varnish callback function. But I found out that not getting ReqAcct tag. Also I am missing lots of logs itself.
>
> After with discussion with you guys it seems problem is due to "-g session" option. So I removed that and tested again and looks better then before. Reduced frequency of missing ReqAcct and Log loss decreased a lot.
>
> Now, my doubt, Is it better not to use any option and keep default setting, or to use -c option ? So I can minimize log loss as many as I can.
>
> Here is small from vmod which is reading shared memory (it was lot easier in varnish 3 because I was able to call dispatch function directly),
> vut =  VUT_Init(argv[0], 1, argv, &s);
> vut->dispatch_f = VarnishLog::handler;
> vut->dispatch_priv = this;
> vut->g_arg = 3;  <----  I commented out this now ( -g session )
> vut->sighup = 1;
> vut->sighup_f = VarnishLog::sighup;
> VUT_Setup(vut);
> VUT_Main(vut);
> VUT_Fini(&vut);

So you wrote your own log utility in C++? Wow!

> I can not change above whole setup but can modify few things in that.
>
> Now, If you can answer previous questions will be really helpful. Particularly how -g session option creating problem ?

Sorry but this is not what I was looking for. [1]

Can you give me a list of log records you need to collect? And
possibly how you are trying to group them if they come from different
transactions? There's a lot we can do without building a new utility.

Dridi

[1] http://xyproblem.info/


More information about the varnish-misc mailing list