-
-
Notifications
You must be signed in to change notification settings - Fork 610
Description
Hi Technitium Team,
First, thank you for building such a fantastic DNS server. I have been building a Prometheus exporter + Grafana dashboard for the community to monitor Technitium instances, and I ran into a limitation regarding how the API reports statistics.
The Problem: Sliding Windows vs. Counters
Currently, the /api/dashboard/stats/get endpoint works on a sliding window basis (e.g., type=LastHour or LastMinute). In observability terms, these are Gauges. They fluctuate up and down.
Time Series Databases (like Prometheus) work best with Monotonically Increasing Counters (values that start at 0 on boot and only increase). This allows monitoring systems to calculate precise rates (Requests Per Second) over any arbitrary timeframe using functions like rate() or increase().
Using "LastHour" stats results in delayed graphs (smoothing out spikes), and using "LastMinute" (via eg. Custom window) stats creates sampling inaccuracies if the scrape interval isn't perfectly aligned.
The Request
Could you please consider adding a parameter (e.g., type=SinceBoot or type=Total) or a new lightweight endpoint that returns cumulative totals since the service started?
Specifically, I am looking for:
- Lifetime Counters:
- totalQueriesSinceStart
- totalBlockedSinceStart
- totalNoErrorSinceStart (and other RCODEs like NxDomain, ServFail)
- totalCachedHitsSinceStart
-
Uptime: A simple uptimeSeconds counter.
-
Zone Visibility: Allow the default "Read Only" user scope to query /api/zones/list. Currently, monitoring zone health (Active/Disabled) requires Admin permissions or manual adding new group to each zone admins.
The Ultimate Goal
Implementing a native /metrics endpoint (standard Prometheus format) would eliminate the need for third-party exporters entirely and make Technitium "Cloud Native" ready out of the box.
Thank you for considering this!
edit: clarification there is no LastMinute per se