From: bert hubert Date: Mon, 25 Apr 2016 18:10:13 +0000 (+0200) Subject: hook up action-stats to JSON output X-Git-Tag: rec-4.0.0-alpha3~46^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3762%2Fhead;p=thirdparty%2Fpdns.git hook up action-stats to JSON output --- 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); }