]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Docs and account for forwarding
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 13 Sep 2022 07:51:33 +0000 (09:51 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 27 Sep 2022 14:32:40 +0000 (16:32 +0200)
pdns/rec-snmp.cc
pdns/recursordist/docs/metrics.rst
pdns/syncres.cc
pdns/ws-recursor.cc

index c847aee742594dadf913a0dfb51ff92e55c7a97f..114cf5ffc47567f0bac856fb51d644644cc42290 100644 (file)
@@ -167,7 +167,6 @@ static const oid rcode13AnswersOID[] = {RECURSOR_STATS_OID, 129, 13};
 static const oid rcode14AnswersOID[] = {RECURSOR_STATS_OID, 129, 14};
 static const oid rcode15AnswersOID[] = {RECURSOR_STATS_OID, 129, 15};
 
-
 static std::unordered_map<oid, std::string> s_statsMap;
 
 /* We are never called for a GETNEXT if it's registered as a
@@ -407,7 +406,7 @@ RecursorSNMPAgent::RecursorSNMPAgent(const std::string& name, const std::string&
   registerCounter64Stat("maintenance-usec", maintenanceUSecOID, OID_LENGTH(maintenanceUSecOID));
   registerCounter64Stat("maintenance-calls", maintenanceCallsOID, OID_LENGTH(maintenanceCallsOID));
 
-#define RCODE(num) registerCounter64Stat("auth-" + RCode::to_short_s(num) + "-answers", rcode ##num ## AnswersOID, OID_LENGTH(rcode ##num ## AnswersOID))
+#define RCODE(num) registerCounter64Stat("auth-" + RCode::to_short_s(num) + "-answers", rcode##num##AnswersOID, OID_LENGTH(rcode##num##AnswersOID))
   RCODE(0);
   RCODE(1);
   RCODE(2);
index 25c0e0659803d2c9859712ecb32f6388abf77317..53309868b8d4018c3e6898b9751f5a85e9b3d818 100644 (file)
@@ -232,6 +232,12 @@ auth6-answers100-1000
 ^^^^^^^^^^^^^^^^^^^^^
 counts the number of queries answered by auth6s within 1 second (4.0)
 
+auth-xxx-answers
+^^^^^^^^^^^^^^^^
+where ``xxx`` is an rcode name (``noerror``, ``formerr``, ``servfail``, ``nxdomain``, ``notimp``, ``refused``, ``yxdomain``, ``yxrrset``, ``nxrrset``, ``notauth``, ``rcode10``, ``rcode11``, ``rcode2``, ``rcode13``, ``rcode14``, ``rcode15``).
+Counts the rcodes returned by authoritative servers.
+
+
 auth-zone-queries
 ^^^^^^^^^^^^^^^^^
 counts the number of queries to locally hosted authoritative zones (:ref:`setting-auth-zones`) since starting
index d940c2afb148bc59ed1245098f80cc5417817928..54334fd4d11184c3ec98adbe1611f40c8d5f271d 100644 (file)
@@ -1842,6 +1842,7 @@ int SyncRes::doResolveNoQNameMinimization(const DNSName &qname, const QType qtyp
 
               d_totUsec += lwr.d_usec;
               accountAuthLatency(lwr.d_usec, remoteIP.sin4.sin_family);
+              ++g_stats.authRCode[lwr.d_rcode];
               if (fromCache)
                 *fromCache = true;
 
index 64b25b5fa010380a9cc485fb2c1e2f72b4ea0526..74f61f4c075380578c1147936a0a907b6571eba4 100644 (file)
@@ -1156,7 +1156,7 @@ const std::map<std::string, MetricDefinition> MetricDefinitionStorage::d_metrics
                     "Number of queries matching proxyMappings")},
 
   // For multicounters, state the first
-  {"auth-noerror-answers",
+  {"auth-formerr-answers",
    MetricDefinition(PrometheusMetricType::multicounter,
                     "Count of RCodes returned by authoritative servers")},
 };