From: bert hubert Date: Thu, 15 Jun 2017 01:15:40 +0000 (+0200) Subject: add some ECS metrics (UNDOCUMENTED) X-Git-Tag: rec-4.1.0-alpha1~42^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6923beb0863ebfe063922046a86a623b08ae2e5;p=pdns add some ECS metrics (UNDOCUMENTED) --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 6dccf5477..2d086f1ed 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -860,6 +860,8 @@ void registerAllStats() addGetStat("dont-outqueries", &SyncRes::s_dontqueries); addGetStat("throttled-out", &SyncRes::s_throttledqueries); addGetStat("unreachables", &SyncRes::s_unreachables); + addGetStat("ecs-queries", &SyncRes::s_ecsqueries); + addGetStat("ecs-responses", &SyncRes::s_ecsresponses); addGetStat("chain-resends", &g_stats.chainResends); addGetStat("tcp-clients", boost::bind(TCPConnection::getCurrentConnections)); diff --git a/pdns/syncres.cc b/pdns/syncres.cc index bd1ee3930..8fa0f9576 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -64,6 +64,8 @@ std::atomic SyncRes::s_throttledqueries; std::atomic SyncRes::s_dontqueries; std::atomic SyncRes::s_nodelegated; std::atomic SyncRes::s_unreachables; +std::atomic SyncRes::s_ecsqueries; +std::atomic SyncRes::s_ecsresponses; uint8_t SyncRes::s_ecsipv4limit; uint8_t SyncRes::s_ecsipv6limit; bool SyncRes::s_doIPv6; @@ -2008,10 +2010,12 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname, ednsmask=getEDNSSubnetMask(d_requestor, qname, remoteIP); if(ednsmask) { LOG(prefix<toString()<<" to query"<toString()<<" on response"< s_tcpoutqueries; static std::atomic s_nodelegated; static std::atomic s_unreachables; + static std::atomic s_ecsqueries; + static std::atomic s_ecsresponses; static string s_serverID; static unsigned int s_minimumTTL;