]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Better naming of cookie metrics
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 9 May 2025 11:49:01 +0000 (13:49 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 4 Sep 2025 09:05:16 +0000 (11:05 +0200)
pdns/recursordist/RECURSOR-MIB.txt
pdns/recursordist/lwres.cc
pdns/recursordist/metrics_table.py
pdns/recursordist/rec-tcounters.hh

index 11d2bbbf8c359cb61c40de7368dce0219b728e57..c51f6ab5956072fbc95d6a0715a3c5e4bb5da50b 100644 (file)
@@ -1316,7 +1316,7 @@ cookieMalformed OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Malformed cookies received"
+        "Number of malformed cookies received"
     ::= { stats 154 }
 
 cookieMatched OBJECT-TYPE
@@ -1324,7 +1324,7 @@ cookieMatched OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Matching cookies received"
+        "Number of matching cookies received"
     ::= { stats 155 }
 
 cookieMismatchTcp OBJECT-TYPE
@@ -1332,7 +1332,7 @@ cookieMismatchTcp OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Mismatched cookies received over TCP"
+        "Number of mismatched cookies received over TCP"
     ::= { stats 156 }
 
 cookieMismatchUdp OBJECT-TYPE
@@ -1340,7 +1340,7 @@ cookieMismatchUdp OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Mismatched cookies received over UDP"
+        "Number of mismatched cookies received over UDP"
     ::= { stats 157 }
 
 cookieNotInReply OBJECT-TYPE
@@ -1348,7 +1348,7 @@ cookieNotInReply OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Authoritative server sent a reply back without cookie"
+        "Number of times an authoritative server sent a reply without a cookie"
     ::= { stats 158 }
 
 cookieRetry OBJECT-TYPE
@@ -1356,7 +1356,7 @@ cookieRetry OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Retries because authoritative server sent a BADCOOKIE reply"
+        "Number of retries because authoritative server sent a BADCOOKIE reply"
     ::= { stats 159 }
 
 cookiesSupported OBJECT-TYPE
@@ -1364,7 +1364,7 @@ cookiesSupported OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Number of authoritative server IPs marked as supporting cookies"
+        "Number of authoritative server cookie probes resulting in success"
     ::= { stats 160 }
 
 cookiesUnsupported OBJECT-TYPE
@@ -1372,7 +1372,7 @@ cookiesUnsupported OBJECT-TYPE
     MAX-ACCESS read-only
     STATUS current
     DESCRIPTION
-        "Number of authoritative server IPs marked as not supporting cookies"
+        "Number of authoritative server cookie probes not resulting in success"
     ::= { stats 161 }
 
 ---
index 234c865773e2ef2663014f9d649892e331bae53c..79ec6249872697779c310f3964e793c7bcbc6fc5 100644 (file)
@@ -493,7 +493,7 @@ static std::pair<bool, LWResult::Result> incomingCookie(const OptLog& log, const
         found->d_localaddress = localip;
         found->d_cookie = received;
         if (found->getSupport() == CookieEntry::Support::Probing) {
-          ++t_Counters.at(rec::Counter::cookiesSupported);
+          ++t_Counters.at(rec::Counter::cookieProbeSupported);
         }
         found->setSupport(CookieEntry::Support::Supported, now.tv_sec);
         // check extended error code
@@ -812,7 +812,7 @@ static LWResult::Result asyncresolve(const OptLog& log, const ComboAddress& addr
         case CookieEntry::Support::Probing:
           VLOG(log, "No cookie in reply from " << address.toString() << ", was probing, setting support to Unsupported" << endl);
           found->setSupport(CookieEntry::Support::Unsupported, now->tv_sec);
-          ++t_Counters.at(rec::Counter::cookiesUnsupported);
+          ++t_Counters.at(rec::Counter::cookieProbeUnsupported);
           break;
         case CookieEntry::Support::Unsupported:
           // We could have detected the server does not support cookies in the meantime
index 52145199e181d2d42b58f0d93cd51754c3a4d8dd..2a4da2299ce964d824ecd23dc19542a57bcd4cb5 100644 (file)
     {
         'name': 'cookie-malformed',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieMalformed); }',
-        'desc': 'Malformed cookies received',
+        'desc': 'Number of malformed cookies received',
         'snmp': 154,
     },
     {
         'name': 'cookie-matched',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieMatched); }',
-        'desc': 'Matching cookies received',
+        'desc': 'Number of matching cookies received',
         'snmp': 155,
     },
     {
         'name': 'cookie-mismatch-tcp',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieMismatchedOverTCP); }',
-        'desc': 'Mismatched cookies received over TCP',
+        'desc': 'Number of mismatched cookies received over TCP',
         'snmp': 156,
     },
     {
         'name': 'cookie-mismatch-udp',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieMismatchedOverUDP); }',
-        'desc': 'Mismatched cookies received over UDP',
+        'desc': 'Number of mismatched cookies received over UDP',
         'snmp': 157,
     },
     {
         'name': 'cookie-not-in-reply',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieNotInReply); }',
-        'desc': 'Authoritative server sent a reply back without cookie',
+        'desc': 'Number of times an authoritative server sent a reply without a cookie',
         'snmp': 158,
     },
     {
         'name': 'cookie-retry',
         'lambda': '[] { return g_Counters.sum(rec::Counter::cookieRetry); }',
-        'desc': 'Retries because authoritative server sent a BADCOOKIE reply',
+        'desc': 'Number of retries because authoritative server sent a BADCOOKIE reply',
         'snmp': 159,
     },
     {
         'name': 'cookies-supported',
-        'lambda': '[] { return g_Counters.sum(rec::Counter::cookiesSupported); }',
-        'desc': 'Number of authoritative server IPs marked as supporting cookies',
+        'lambda': '[] { return g_Counters.sum(rec::Counter::cookieProbeSupported); }',
+        'desc': 'Number of authoritative server cookie probes resulting in success',
         'snmp': 160,
     },
     {
         'name': 'cookies-unsupported',
-        'lambda': '[] { return g_Counters.sum(rec::Counter::cookiesUnsupported); }',
-        'desc': 'Number of authoritative server IPs marked as not supporting cookies',
+        'lambda': '[] { return g_Counters.sum(rec::Counter::cookieProbeUnsupported); }',
+        'desc': 'Number of authoritative server cookie probes not resulting in success',
         'snmp': 161,
     },
     {
index 171a286cb4e6eeecd7d08aa6b131e62c0be91034..070d5b221b475103d57178c98151692f5e649724 100644 (file)
@@ -105,8 +105,8 @@ enum class Counter : uint8_t
   cookieMismatchedOverUDP,
   cookieNotInReply,
   cookieRetry,
-  cookiesSupported,
-  cookiesUnsupported,
+  cookieProbeSupported,
+  cookieProbeUnsupported,
 
   numberOfCounters
 };