mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
new: usr: 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. Related to #1793 Merge branch 'aram/add-new-stats-channel-counter-forwardonlyfail' into 'main' See merge request isc-projects/bind9!9498
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -166,10 +166,11 @@ status=$((status + ret))
|
||||
|
||||
# GL#1793
|
||||
n=$((n + 1))
|
||||
echo_i "checking that the 'serverquota' counter isn't increased because of the SERVFAIL in the previous check ($n)"
|
||||
echo_i "checking that the correct counter is increased because of the SERVFAIL in the previous check ($n)"
|
||||
ret=0
|
||||
"${CURL}" "http://10.53.0.4:${EXTRAPORT1}/json/v1" 2>/dev/null >statschannel.out.$n
|
||||
grep -F "ServerQuota" statschannel.out.$n >/dev/null && ret=1
|
||||
grep -F '"ServerQuota"' statschannel.out.$n >/dev/null && ret=1
|
||||
grep -F '"ForwardOnlyFail":1' statschannel.out.$n >/dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
|
@@ -8236,6 +8236,9 @@ Resolver Statistics Counters
|
||||
``ClientQuota``
|
||||
This indicates the number of queries spilled for exceeding the :any:`clients-per-query` quota.
|
||||
|
||||
``ForwardOnlyFail``
|
||||
This indicates the number of queries failed due to bad forwarders for ``forward only`` zones.
|
||||
|
||||
``NextItem``
|
||||
This indicates the number of times the server waited for the next item after receiving an invalid response.
|
||||
|
||||
|
@@ -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 {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user