I was hoping to try doing some query logging with kresd. Looking at the documents:
policy.REQTRACE
Pretty-print DNS requests from clients into the verbose log. It’s useful for debugging weird DNS clients. Verbose logging must be enabled using verbose() for this policy to be effective. It makes most sense together with Views and ACLs.
So, I tried adding it to my custom.conf file and restarting.
policy.add(policy.suffix(policy.REQTRACE))
but ended up with a lot of
kresd[10492]: [system] error while loading config: /usr/lib/kres_modules/policy.lua:346: bad argument #1 to 'create' (table expected, got nil) (workdir '/tmp/kresd')
lines, so I’m not doing something right.
Has anyone tried doing this?
I can just turn on verbose logging and probably get what I need, but I was hoping not to have to wade through a lot of extra stuff and get a more concise output.
Yes. But I was assuming that I could put the option in and turn verbose logging on and off and have the option just work when it’s on. Perhaps I can turn this on in a similar way.
I’ve got a simple script that can turn on debugging with:
Using the socket is possible, but it might be practical to just restart the daemon. Cache is kept by default on restarts, so it should be pretty cheap.
So this line from documentation is wrong – at least in the current version of Knot Resolver I see these as two kinds of information logged and configured independently of each other. I’ll be looking into fixing it, most likely just by changing the docs.
I have actually found myself moving away from tech in general, so it may entirely be my issue. I’ve lost a lot of patience for wading through technical documents in the past few years, especially for things I do infrequently.
I’m well versed with BIND, so I’m probably too impatient learning a different DNS system.