thread_local std::unique_ptr<MemRecursorCache> t_RC;
thread_local std::unique_ptr<RecursorPacketCache> t_packetCache;
thread_local FDMultiplexer* t_fdm{nullptr};
-thread_local std::unique_ptr<addrringbuf_t> t_remotes, t_servfailremotes, t_largeanswerremotes, t_bogusremotes;
+thread_local std::unique_ptr<addrringbuf_t> t_remotes, t_servfailremotes, t_largeanswerremotes, t_bogusremotes, t_timeouts;
thread_local std::unique_ptr<boost::circular_buffer<pair<DNSName, uint16_t> > > t_queryring, t_servfailqueryring, t_bogusqueryring;
thread_local std::shared_ptr<NetmaskGroup> t_allowFrom;
#ifdef HAVE_PROTOBUF
t_bogusremotes->set_capacity(ringsize);
t_largeanswerremotes = std::unique_ptr<addrringbuf_t>(new addrringbuf_t());
t_largeanswerremotes->set_capacity(ringsize);
+ t_timeouts = std::unique_ptr<addrringbuf_t>(new addrringbuf_t());
+ t_timeouts->set_capacity(ringsize);
t_queryring = std::unique_ptr<boost::circular_buffer<pair<DNSName, uint16_t> > >(new boost::circular_buffer<pair<DNSName, uint16_t> >());
t_queryring->set_capacity(ringsize);
std::vector<ComboAddress>* pleaseGetServfailRemotes();
std::vector<ComboAddress>* pleaseGetBogusRemotes();
std::vector<ComboAddress>* pleaseGetLargeAnswerRemotes();
+std::vector<ComboAddress>* pleaseGetTimeouts();
DNSName getRegisteredName(const DNSName& dom);
std::atomic<unsigned long>* getDynMetric(const std::string& str);
optional<uint64_t> getStatByName(const std::string& name);
return ret;
}
+vector<ComboAddress>* pleaseGetTimeouts()
+{
+ vector<ComboAddress>* ret = new vector<ComboAddress>();
+ if(!t_timeouts)
+ return ret;
+ ret->reserve(t_timeouts->size());
+ for(const ComboAddress& ca : *t_timeouts) {
+ ret->push_back(ca);
+ }
+ return ret;
+}
+
string doGenericTopRemotes(pleaseremotefunc_t func)
{
typedef map<ComboAddress, int, ComboAddress::addressOnlyLessThan> counts_t;
"top-queries show top queries\n"
"top-pub-queries show top queries grouped by public suffix list\n"
"top-remotes show top remotes\n"
+"top-timeouts show top downstream timeouts"
"top-servfail-queries show top queries receiving servfail answers\n"
"top-bogus-queries show top queries validating as bogus\n"
"top-pub-servfail-queries show top queries receiving servfail answers grouped by public suffix list\n"
if(cmd=="top-largeanswer-remotes")
return doGenericTopRemotes(pleaseGetLargeAnswerRemotes);
+ if(cmd=="top-timeouts")
+ return doGenericTopRemotes(pleaseGetTimeouts);
+
if(cmd=="current-queries")
return doCurrentQueries();
Shows the top-20 most active remote hosts causing bogus responses.
Statistics are over the last 'stats-ringbuffer-entries' queries.
+top-timeouts
+ Shows the top-20 most active downstream timeout destinations.
+ Statistics are over the last 'stats-ringbuffer-entries' queries.
+
trace-regex *REGEX*
Emit resolution trace for matching queries. Empty regex to disable trace.
<div class="stats-table" id="remotering"></div>
<div class="stats-table" id="servfailremotering"></div>
<div class="stats-table" id="bogusremotering"></div>
+ <div class="stats-table" id="timeouts"></div>
</div>
</div>
</table>
</script>
+<script id="timeouts-template" type="text/x-handlebars-template">
+ <table class="two-col">
+ <tr>
+ <th>Number</th>
+ <th>Downstream timeouts</th>
+ </tr>
+ {{#each rows}}
+ <tr>
+ <td>{{0}}</td>
+ <td>{{1}}</td>
+ </tr>
+ {{/each}}
+ </table>
+</script>
+
</body>
</html>
var rows = makeRingRows(data);
render('bogusremotering', {rows: rows});
});
+ $.getJSON('jsonstat', jsonstatParams('get-remote-ring', 'timeouts', false),
+ function (data) {
+ var rows = makeRingRows(data);
+ render('timeouts', {rows: rows});
+ });
}
var connectionOK = function (ok, o) {
else {
// timeout
t_sstorage.throttle.throttle(d_now.tv_sec, boost::make_tuple(remoteIP, qname, qtype.getCode()), 10, 5);
+ if(t_timeouts)
+ t_timeouts->push_back(remoteIP);
}
}
};
typedef boost::circular_buffer<ComboAddress> addrringbuf_t;
-extern thread_local std::unique_ptr<addrringbuf_t> t_servfailremotes, t_largeanswerremotes, t_remotes, t_bogusremotes;
+extern thread_local std::unique_ptr<addrringbuf_t> t_servfailremotes, t_largeanswerremotes, t_remotes, t_bogusremotes, t_timeouts;
extern thread_local std::unique_ptr<boost::circular_buffer<pair<DNSName,uint16_t> > > t_queryring, t_servfailqueryring, t_bogusqueryring;
extern thread_local std::shared_ptr<NetmaskGroup> t_allowFrom;
queries=broadcastAccFunction<vector<ComboAddress> >(pleaseGetBogusRemotes);
else if(req->getvars["name"]=="large-answer-remotes")
queries=broadcastAccFunction<vector<ComboAddress> >(pleaseGetLargeAnswerRemotes);
+ else if(req->getvars["name"]=="timeouts")
+ queries=broadcastAccFunction<vector<ComboAddress> >(pleaseGetTimeouts);
typedef map<ComboAddress,unsigned int,ComboAddress::addressOnlyLessThan> counts_t;
counts_t counts;