DnsServer icon indicating copy to clipboard operation
DnsServer copied to clipboard

Use "Query Logs (Sqlite)" addon with MySql or other databases

Open DomiiBunn opened this issue 2 years ago • 4 comments

Can the addon utilize other means of storing the data?

I see a connectionString option but I'm not sure if I can use it, Don't really want to break the server either.

DomiiBunn avatar Apr 14 '22 17:04 DomiiBunn

Thanks for the post. The Query Logs (Sqlite) app only support sqlite databases. For using another database backend, another app needs to be created which supports that specific database. The new app will essentially be a clone of this one but will use the mysql client and will need some changes to the queries especially for the bulk insert thing.

There is no plan currently to add an app that supports different database but I can add it if I can find some time in between releases.

ShreyasZare avatar Apr 15 '22 06:04 ShreyasZare

That would be really great! Thanks

On Fri, Apr 15, 2022, 08:21 Shreyas Zare @.***> wrote:

Thanks for the post. The Query Logs (Sqlite) app only support sqlite databases. For using another database backend, another app needs to be created which supports that specific database. The new app will essentially be a clone of this one but will use the mysql client and will need some changes to the queries especially for the bulk insert thing.

There is no plan currently to add an app that supports different database but I can add it if I can find some time in between releases.

— Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/381#issuecomment-1099886657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMK42CQO2JBZ2B2YEEDGG73VFEDFLANCNFSM5TOM4CNQ . You are receiving this because you authored the thread.Message ID: @.***>

DomiiBunn avatar Apr 15 '22 10:04 DomiiBunn

In my opinion the log query browser isn't that fast. I think that is because of the SQLite DB (my data is stored on an Raid1 SSD). Instead to build-in an other DB it could also be a possibility to write a log exporter for example Loki to fetch the date from there (example Grafana). That could be much faster and you do not have to implement and maintain a search UI in your application. If it is implemented with the OpenTelemetry Standard then the community would have a large choice of tools to visualize and analyze the logs. Unfortunately I do not know C# enough to help here with. 😣

matthiasbaldi avatar Oct 19 '22 21:10 matthiasbaldi

In my opinion the log query browser isn't that fast. I think that is because of the SQLite DB (my data is stored on an Raid1 SSD). Instead to build-in an other DB it could also be a possibility to write a log exporter for example Loki to fetch the date from there (example Grafana). That could be much faster and you do not have to implement and maintain a search UI in your application. If it is implemented with the OpenTelemetry Standard then the community would have a large choice of tools to visualize and analyze the logs. Unfortunately I do not know C# enough to help here with. 😣

The query logs browser performance depends on the database and sqlite is a bit slow. If you put in a filter criteria then the query hits an index which is smaller and then it works much better. Having another DNS app that can use a separate hosted DB will surely improve the performance.

Its possible to have a DNS app that uses OpenTelemetry but it can create issues with high volume DNS traffic. The DNS app should be able to consume the query logs as fast as possible failing which the internal log queue will swell up consuming all available system memory and crash the DNS server. So, relying on a 3rd party logging service that is accessible over the Internet can cause issues when the Internet goes down briefly for any reasons.

ShreyasZare avatar Oct 20 '22 05:10 ShreyasZare