<p dir="ltr">Albert,</p>
<p dir="ltr">That is a great idea! I used to do just this, worked wonders. Joachim, see the tutorial:<br>
"This paper describes an approach with rsyslogd, an alternative enhanced syslog daemon natively supporting MySQL and PostgreSQL. "</p>
<p dir="ltr"><a href="http://www.rsyslog.com/doc/v8-stable/tutorials/database.html">http://www.rsyslog.com/doc/v8-stable/tutorials/database.html</a><br></p>
<div class="gmail_quot<blockquote class=" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Joachim,<br>
<br>
Le Sun, 12 Jun 2016 17:39:12 +0200<br>
Joachim Zobel <<a href="mailto:jz-2014@heute-morgen.de">jz-2014@heute-morgen.de</a>> a écrit:<br>
<br>
> Hi.<br>
><br>
> The main problem for my reverse_replace script is speed. It takes a<br>
> minute, which is too slow to be run from a web gui. This is because<br>
> the script parses the last 15k lines and puts them into an IP->name<br>
> lookup tables made up from enviroment variables.<br>
><br>
> Is there a way to log queries to a database? Something along the<br>
> lines of log-facility=/named/pipe and a clever script that turns its<br>
> stdin into INSERT statements. This way I could avoid building the<br>
> lookup table.<br>
<br>
I don"t see any option in dnsmasq for that, but maybe you could<br>
configure your syslog/rsyslog/systemd logger to route dnsmasq logs to<br>
some script (in addition to the standard logging), and that script<br>
would do the database logging.<br>
<br>
Problem, of course, is that you'd have to handle database purging, as I<br>
don't think dnsmasq anything when it purges its cache, so your DB would<br>
keep growing if you did not purge it, e.g. based on record date.<br>
<br>
> Sincerely,<br>
> Joachim<br>
<br>
Amicalement,<br>
--<br>
Albert.<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</div>