From 4140208aebef22e43a84020f2a912e38f3140ccd Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 2 Oct 2018 21:00:27 +0200 Subject: [PATCH] gather a few more stats --- pdns/ixfrdist-stats.hh | 16 ++++++++++++---- pdns/ixfrdist.cc | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/pdns/ixfrdist-stats.hh b/pdns/ixfrdist-stats.hh index 000be560dd..75decdb570 100644 --- a/pdns/ixfrdist-stats.hh +++ b/pdns/ixfrdist-stats.hh @@ -41,13 +41,19 @@ class ixfrdistStats { stats<<"# TYPE "< numSOAChecksFailed; std::atomic numSOAinQueries; - std::atomic numIXFRinQueries; std::atomic numAXFRinQueries; + std::atomic numIXFRinQueries; std::atomic numAXFRFailures; std::atomic numIXFRFailures; diff --git a/pdns/ixfrdist.cc b/pdns/ixfrdist.cc index 12623e23d4..6b3afe17bd 100644 --- a/pdns/ixfrdist.cc +++ b/pdns/ixfrdist.cc @@ -236,6 +236,7 @@ static void updateCurrentZoneInfo(const DNSName& domain, std::shared_ptr guard(g_soas_mutex); g_soas[domain] = newInfo; g_stats.setSOASerial(domain, newInfo->soa->d_st.serial); + // FIXME: also report zone size? } void updateThread(const string& workdir, const uint16_t& keep, const uint16_t& axfrTimeout, const uint16_t& soaRetry) { @@ -317,6 +318,7 @@ void updateThread(const string& workdir, const uint16_t& keep, const uint16_t& a shared_ptr sr; try { zoneLastCheck = now; + g_stats.incrementSOAChecks(domain); auto newSerial = getSerialFromMaster(master, domain, sr); // TODO TSIG if(current_soa != nullptr) { g_log<d_st.serial; @@ -328,6 +330,7 @@ void updateThread(const string& workdir, const uint16_t& keep, const uint16_t& a } } catch (runtime_error &e) { g_log< axfrTimeout) { + g_stats.incrementAXFRFailures(domain); throw PDNSException("Total AXFR time exceeded!"); } } if (soa == nullptr) { + g_stats.incrementAXFRFailures(domain); g_log<soa = soa; updateCurrentZoneInfo(domain, zoneInfo); } catch (PDNSException &e) { + g_stats.incrementAXFRFailures(domain); g_log<d_st.serial<<" for zone "<