mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-12 05:32:42 -04:00
Implement the ForwardOnlyFail statistics channel counter
The new ForwardOnlyFail statistics channel counter indicates the number of queries failed due to bad forwarders for 'forward only' zones.
This commit is contained in:
parent
b82957376d
commit
a018b4e36f
3 changed files with 16 additions and 3 deletions
|
|
@ -472,6 +472,8 @@ init_desc(void) {
|
|||
"ClientQuota");
|
||||
SET_RESSTATDESC(nextitem, "waited for next item", "NextItem");
|
||||
SET_RESSTATDESC(priming, "priming queries", "Priming");
|
||||
SET_RESSTATDESC(forwardonlyfail, "all forwarders failed",
|
||||
"ForwardOnlyFail");
|
||||
|
||||
INSIST(i == dns_resstatscounter_max);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,8 @@ enum {
|
|||
dns_resstatscounter_clientquota = 43,
|
||||
dns_resstatscounter_nextitem = 44,
|
||||
dns_resstatscounter_priming = 45,
|
||||
dns_resstatscounter_max = 46,
|
||||
dns_resstatscounter_forwardonlyfail = 46,
|
||||
dns_resstatscounter_max = 47,
|
||||
|
||||
/*
|
||||
* DNSSEC stats.
|
||||
|
|
|
|||
|
|
@ -3715,13 +3715,23 @@ out:
|
|||
|
||||
/*
|
||||
* If all of the addresses found were over the
|
||||
* fetches-per-server quota, return the
|
||||
* configured response.
|
||||
* fetches-per-server quota, increase the ServerQuota
|
||||
* counter and return the configured response.
|
||||
*/
|
||||
if (all_spilled) {
|
||||
result = res->quotaresp[dns_quotatype_server];
|
||||
inc_stats(res, dns_resstatscounter_serverquota);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are using a 'forward only' policy, and all
|
||||
* the forwarders are bad, increase the ForwardOnlyFail
|
||||
* counter.
|
||||
*/
|
||||
if (fctx->fwdpolicy == dns_fwdpolicy_only) {
|
||||
inc_stats(res,
|
||||
dns_resstatscounter_forwardonlyfail);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue