From 51ec1331832fe8f03bee29019ba649bf101c2334 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 10 Mar 2023 14:09:39 +0100 Subject: [PATCH] dnsdist: Report per-incoming transport latencies in the web interface Since 1.8.0 we have separate latencies based on the incoming transport, but the internal web interface was only reporting the UDP one. After this commit the interface will display the latency for UDP, TCP, DoT and DoH queries. Reported by Stephane Bortzmeyer (thanks!). --- pdns/dnsdistdist/html/index.html | 3 ++- pdns/dnsdistdist/html/local.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/html/index.html b/pdns/dnsdistdist/html/index.html index 7e2599780b..4f3bc695e9 100644 --- a/pdns/dnsdistdist/html/index.html +++ b/pdns/dnsdistdist/html/index.html @@ -50,7 +50,8 @@

Uptime: , Number of queries: ( qps), ACL drops: , Dynamic drops: , Rule drops:
- Average response time: ms, CPU Usage: %, Cache hitrate: %, Server selection policy:
+ Average response time: UDP ms, TCP ms, DoT ms, DoH ms
+ CPU Usage: %, Cache hitrate: %, Server selection policy:
Listening on: , ACL:

diff --git a/pdns/dnsdistdist/html/local.js b/pdns/dnsdistdist/html/local.js index cbf9534063..05277e4e9c 100644 --- a/pdns/dnsdistdist/html/local.js +++ b/pdns/dnsdistdist/html/local.js @@ -151,6 +151,9 @@ $(document).ready(function() { $("#rule-drops").text(data["rule-drop"]); $("#uptime").text(moment.duration(data["uptime"]*1000.0).humanize()); $("#latency").text((data["latency-avg10000"]/1000.0).toFixed(2)); + $("#latency-tcp").text((data["latency-tcp-avg10000"]/1000.0).toFixed(2)); + $("#latency-dot").text((data["latency-dot-avg10000"]/1000.0).toFixed(2)); + $("#latency-doh").text((data["latency-doh-avg10000"]/1000.0).toFixed(2)); if(!gdata["cpu-sys-msec"]) gdata=data; -- 2.47.2