[dnsdist] Logging
Casey Deccio
casey at deccio.net
Wed Mar 20 00:48:02 UTC 2019
Sigh. Apparently my problem was that I was putting the RemoteLogAction()s after all the other actions. When I put them up front in my configuration, it worked like a champ!
Thanks again for the help!
Casey
> On Mar 19, 2019, at 4:35 PM, Jonathan Reed <jreed777 at gmail.com> wrote:
>
> This ought to work
>
> remote_logger = newRemoteLogger('1.1.1.1:5140 <http://1.1.1.1:5140/>')
> logged_domains = {'example.com <http://example.com/>'}
> addAction(logged_domains, RemoteLogAction(remote_logger))
> addResponseAction(logged_domains, RemoteLogResponseAction(remote_logger))
> addCacheHitResponseAction(logged_domains, RemoteLogResponseAction(remote_logger))
>
> On Tue, Mar 19, 2019 at 5:04 PM Casey Deccio <casey at deccio.net <mailto:casey at deccio.net>> wrote:
>
>> On Mar 19, 2019, at 2:19 PM, Jonathan Reed <jreed777 at gmail.com <mailto:jreed777 at gmail.com>> wrote:
>>
>> Winfried provided some help to me a few months back by pointing out that the Protobuf example code is located in the pdns repo.
>> https://github.com/PowerDNS/pdns/blob/master/contrib/ProtobufLogger.py <https://github.com/PowerDNS/pdns/blob/master/contrib/ProtobufLogger.py>
>
> This is great! Thanks for the pointer!
>
> Now, what am I missing to get my queries to go there? I have this in my dnsdist.conf:
>
> rl = newRemoteLogger("127.0.0.1:4242 <http://127.0.0.1:4242/>")
> addAction(AllRule(), RemoteLogAction(rl))
>
> And, I've started ProtobufLogger.py (as is) with:
>
> $ python ProtobufLogger.py 127.0.0.1 4242
>
> (Obviously, these are running on the same machine.)
>
> But I get no connections on the socket.
>
> Incidentally, I just came across this:
>
> addAction(AllRule(), LogAction("dnsdist.log", false, true, false))
>
> Which I tried instead, just to see if it could also work for my purposes. Unfortunately, I didn't see any entries in there either. Any ideas as to what I'm doing wrong? Presumably, I'm missing something in my dnsdist.conf.
>
> Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20190319/9da63318/attachment.html>
More information about the dnsdist
mailing list