From 1f4059be9e4d566172db883fa5634e454ad00dea Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 25 Apr 2016 20:10:13 +0200 Subject: [PATCH] hook up action-stats to JSON output --- pdns/dnsdist-web.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index e2e47806fe..67e60971b3 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -216,9 +216,11 @@ static void connectionThread(int sock, ComboAddress remote, string password, str for(const auto& a : localRules) { Json::object rule{ {"id", num++}, - {"matches", (int)a.first->d_matches}, - {"rule", a.first->toString()}, - {"action", a.second->toString()} }; + {"matches", (int)a.first->d_matches}, + {"rule", a.first->toString()}, + {"action", a.second->toString()}, + {"action-stats", a.second->getStats()} + }; rules.push_back(rule); } -- 2.47.2