Dashboard doesn't count forwarded queries #144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This screnshot shows 0% forwards despite lots of forwards being there:
This is my setup. Lan domain is handled by dnsmasq:
Thanks for the detailed report - the screenshots help a lot.
A bit of naming context first, because I think part of what you're seeing is expected: since v0.14.1 numa splits queries that hit a
[[forwarding]]suffix rule (tagged FORWARD) from queries that fall through to the default[upstream]pool (tagged UPSTREAM). In your config,9.9.9.9DoH is the default upstream, and the.lan/168.192.in-addr.arparules point at dnsmasq. So:printer.lan-> FORWARD (matched the rule)google.com-> UPSTREAM (default pool)Your query log screenshot only shows the second kind — all visible entries are
google.com,gstatic.com,brave.com, etc., no.lannames at all. That's consistent with devices on your LAN resolving.lanvia dnsmasq directly (or via mDNS), so those queries never reach numa. If that's the case, "0% forwards" is accurate, not a counter bug.That said, one thing in your dashboard does look off: the Upstream row is missing from the Resolution Paths chart entirely (the dashboard hides rows where the counter is exactly 0). But the query log clearly shows many UPSTREAM entries with NOERROR and ~20 ms latency, so the upstream counter shouldn't be 0.
I spun up v0.14.2 in docker with your exact forwarding shape (numa + dnsmasq on a private subnet, two
[[forwarding]]rules forlanand168.192.in-addr.arpa) and sent a mix of.lan+ external queries. Both counters incremented correctly and both bars rendered:-> Forward 6.7%, Upstream 16.0%, Cached 77.3% — all visible. So the counter and dashboard filter aren't broken in the general case.
To pinpoint what's different on your side, could you share:
curl -s http://127.0.0.1:5380/stats | jq .queries— raw counter values, especially whetherupstreamis literally0.numa --version(or just the top of the numa logs on startup).router.lan. Easiest repro from the numa host:dig @127.0.0.1 router.lanand then check Recent Queries for a FORWARD entry.That will tell us whether this is a counter bug, a version skew, or just devices bypassing numa for LAN names.
Yes, .lan queries show up as forwards:
So looks like it's working as intended and UPSTREAM path doesn't have its own bar at all? Strange, bc i remember when i first installed numa queries that went to https://dns.quad9.net/dns-query were in the FORWARD category. I remember seeing that red bar being there. Did something change in the meantime or did i meesed up something in the config?
Good catch and the Upstream row missing is a real issue - but on your side it's a stale cache of the dashboard HTML, not a counter bug. Your
/statsoutput is correct (upstream: 2161, forwarded: 16), and the binary is genuinely 0.14.2. The dashboard HTML, though, is served from / with no Cache-Control header, so when you upgraded numa your browser kept serving the pre-0.14.0 version - which is why (a) the Upstream row isn't there and (b) Recursive/Override still render at 0.0% despite the zero-filter that landed in 0.14.0.Confirm by hard-refreshing the dashboard or open in a private window. You should get a new row for Upstream at ~4.3% and Recursive/Override should disappear entirely.
On the naming question: yes, this changed. Pre-0.14.0 both suffix-rule matches and default-pool queries were tagged FORWARD, so everything going to
9.9.9.9showed up on the red bar. In 0.14.0 I split them — FORWARD now means "matched a forwarding rule" (i.e. dnsmasq for you) and UPSTREAM means "default pool" (Quad9 DoH). Same resolution, clearer accounting.I'll ship a fix so the dashboard actually refreshes across upgrades without needing a hard reload.
Oh damn, i din't thought about refreshing!
Red bar is back! :) I'm sorry for wasting your time. Should thought about it earlier.