]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Document taskqueue metrics and add them to SNMP MIB
authorOtto <otto.moerbeek@open-xchange.com>
Wed, 27 Jan 2021 10:19:41 +0000 (11:19 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 27 Jan 2021 10:19:41 +0000 (11:19 +0100)
pdns/rec-snmp.cc
pdns/recursordist/RECURSOR-MIB.txt
pdns/recursordist/docs/metrics.rst

index 693deed5b8cbfba8f01bddfd63716c10fb774d73..03c64193f71877dd3eb6b1a5f327e437f5cfe47f 100644 (file)
@@ -122,6 +122,9 @@ static const oid proxyProtocolInvalidOID[] = { RECURSOR_STATS_OID, 101 };
 static const oid recordCacheContendedOID[] = { RECURSOR_STATS_OID, 102 };
 static const oid recordCacheAcquiredOID[] = { RECURSOR_STATS_OID, 103 };
 static const oid nodLookupsDroppedOversizeOID[] = { RECURSOR_STATS_OID, 104 };
+static const oid taskQueuePushedOID[] = { RECURSOR_STATS_OID, 105 };
+static const oid taskQueueExpiredOID[] = { RECURSOR_STATS_OID, 106 };
+static const oid taskQueueSizeOID[] = { RECURSOR_STATS_OID, 107 };
 
 static std::unordered_map<oid, std::string> s_statsMap;
 
@@ -335,5 +338,8 @@ RecursorSNMPAgent::RecursorSNMPAgent(const std::string& name, const std::string&
   registerCounter64Stat("record-cache-contended", recordCacheContendedOID, OID_LENGTH(recordCacheContendedOID));
   registerCounter64Stat("record-cache-acquired", recordCacheAcquiredOID, OID_LENGTH(recordCacheAcquiredOID));
   registerCounter64Stat("nod-lookups-dropped-oversize", nodLookupsDroppedOversizeOID, OID_LENGTH(nodLookupsDroppedOversizeOID));
+  registerCounter64Stat("tasqueue-pushed", taskQueuePushedOID, OID_LENGTH(taskQueuePushedOID));
+  registerCounter64Stat("taskqueue-expired", taskQueueExpiredOID, OID_LENGTH(taskQueueExpiredOID));
+  registerCounter64Stat("taskqueue-size", taskQueueSizeOID, OID_LENGTH(taskQueueSizeOID));
 #endif /* HAVE_NET_SNMP */
 }
index 99903c184a425655ea7372b8eeb0964a0c791f53..10e7c30a361065eac9222e7054bbcd3e96d69724 100644 (file)
@@ -871,6 +871,30 @@ nodLookupsDroppedOversize OBJECT-TYPE
         "Number of NOD lookups dropped because they would exceed the maximum name length"
     ::= { stats 104 }
 
+taskQueuePushed OBJECT-TYPE
+    SYNTAX Counter64
+    MAX-ACCESS read-only
+    STATUS current
+    DESCRIPTION
+        "Number of tasks pushed to the taskqueues"
+    ::= { stats 105 }
+
+taskQueueExpired OBJECT-TYPE
+    SYNTAX Counter64
+    MAX-ACCESS read-only
+    STATUS current
+    DESCRIPTION
+        "Number of tasks expired before they could be run"
+    ::= { stats 106 }
+
+taskQueueSize OBJECT-TYPE
+    SYNTAX Counter64
+    MAX-ACCESS read-only
+    STATUS current
+    DESCRIPTION
+        "Number of tasks currenlty in the taskqueues"
+    ::= { stats 107 }
+
 ---
 --- Traps / Notifications
 ---
@@ -1018,7 +1042,10 @@ recGroup OBJECT-GROUP
         proxyProtocolInvalid,
         recordCacheContended,
         recordCacheAcquired,
-        nodLookupsDroppedOversize
+        nodLookupsDroppedOversize,
+        taskQueuePushed,
+        taskQueueExpired,
+        taskQueueSize
     }
     STATUS current
     DESCRIPTION "Objects conformance group for PowerDNS Recursor"
index ebbdee72bc467fe3dba937a4cfb03e205e4c5c57..061a37a29dc118aded2d1a20affd2123991393c2 100644 (file)
@@ -416,6 +416,10 @@ no-packet-error
 ^^^^^^^^^^^^^^^
 number of erroneous received packets
 
+nod-lookups-dropped-oversize
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Number of NOD lookups dropped because they would exceed the maximum name length"^^
+
 noedns-outqueries
 ^^^^^^^^^^^^^^^^^
 number of queries sent out without EDNS
@@ -562,6 +566,24 @@ sys-msec
 ^^^^^^^^
 number of CPU milliseconds spent in 'system' mode
 
+tastqueue-pushed
+^^^^^^^^^^^^^^^^
+.. versionadded:: 4.5.0
+
+number of tasks pushed to the taskqueue
+
+tastqueue-expired
+^^^^^^^^^^^^^^^^
+.. versionadded:: 4.5.0
+
+number of tasks expired before they could be run
+
+tastqueue-size
+^^^^^^^^^^^^^^
+.. versionadded:: 4.5.0
+
+number of tasks currenlty in the taskqueues
+
 tcp-client-overflow
 ^^^^^^^^^^^^^^^^^^^
 number of times an IP address was denied TCP   access because it already had too many connections