From 684f332e8cd60b4c7132c668e4e4f1492aab79d1 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 2 May 2018 17:28:36 +0200 Subject: [PATCH] dnsdist: show droprate in API output --- pdns/dnsdist-web.cc | 3 ++- pdns/dnsdistdist/docs/guides/webserver.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 8cee0f379..10407d011 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -414,7 +414,8 @@ static void connectionThread(int sock, ComboAddress remote, string password, str {"pools", pools}, {"latency", (double)(a->latencyUsec/1000.0)}, {"queries", (double)a->queries}, - {"sendErrors", (double)a->sendErrors} + {"sendErrors", (double)a->sendErrors}, + {"dropRate", (double)a->dropRate} }; /* sending a latency for a DOWN server doesn't make sense */ diff --git a/pdns/dnsdistdist/docs/guides/webserver.rst b/pdns/dnsdistdist/docs/guides/webserver.rst index 9bfc57216..aa07e9f4b 100644 --- a/pdns/dnsdistdist/docs/guides/webserver.rst +++ b/pdns/dnsdistdist/docs/guides/webserver.rst @@ -220,6 +220,7 @@ JSON Objects :property integer sendErrors: Number of network errors while sending a query to this server :property string state: The state of the server (e.g. "DOWN" or "up") :property integer weight: The weight assigned to this server + :property float dropRate: The amount of packets dropped per second by this server .. json:object:: StatisticItem -- 2.40.0