static const oid aggressiveNSECCacheNSEC3WCHitsOID[] = { RECURSOR_STATS_OID, 112 };
static const oid dotOutqueriesOID [] = { RECURSOR_STATS_OID, 113 };
static const oid dns64PrefixAnswers [] = { RECURSOR_STATS_OID, 114 };
+static const oid almostExpiredPushed [] = { RECURSOR_STATS_OID, 115 };
+static const oid almostExpiredRun [] = { RECURSOR_STATS_OID, 116 };
+static const oid almostExpiredExceptions [] = { RECURSOR_STATS_OID, 117 };
static std::unordered_map<oid, std::string> s_statsMap;
registerCounter64Stat("aggressive-nsec-cache-nsec-wc3-hits", aggressiveNSECCacheNSEC3WCHitsOID, OID_LENGTH(aggressiveNSECCacheNSEC3WCHitsOID));
registerCounter64Stat("dot-outqueries", dotOutqueriesOID, OID_LENGTH(dotOutqueriesOID));
registerCounter64Stat("dns64-prefix-answers", dns64PrefixAnswers, OID_LENGTH(dns64PrefixAnswers));
+ registerCounter64Stat("almost-expired-pushed", almostExpiredPushed, OID_LENGTH(almostExpiredPushed));
+ registerCounter64Stat("almost-expired-run", almostExpiredRun, OID_LENGTH(almostExpiredRun));
+ registerCounter64Stat("almost-expired-exceptions", almostExpiredExceptions, OID_LENGTH(almostExpiredExceptions));
#endif /* HAVE_NET_SNMP */
}
addGetStat("dns64-prefix-answers", &g_stats.dns64prefixanswers);
+ addGetStat("almost-expired-pushed", []() { return getAlmostExpiredTasksPushed(); });
+ addGetStat("almost-expired-run", []() { return getAlmostExpiredTasksRun(); });
+ addGetStat("almost-expired-exceptions", []() { return getAlmostExpiredTaskExceptions(); });
+
/* make sure that the ECS stats are properly initialized */
SyncRes::clearECSStats();
for (size_t idx = 0; idx < SyncRes::s_ecsResponsesBySubnetSize4.size(); idx++) {
sortlist.cc sortlist.hh \
sstuff.hh \
stable-bloom.hh \
- stats_t.hh \
+ stat_t.hh \
svc-records.cc svc-records.hh \
syncres.cc syncres.hh \
taskqueue.cc taskqueue.hh \
FROM SNMPv2-CONF;
rec MODULE-IDENTITY
- LAST-UPDATED "202002170000Z"
+ LAST-UPDATED "202107200000Z"
ORGANIZATION "PowerDNS BV"
CONTACT-INFO "support@powerdns.com"
DESCRIPTION
REVISION "202101050000Z"
DESCRIPTION "Added Aggressive NSEC cache metrics."
+ REVISION "202107200000Z"
+ DESCRIPTION "Added almost expired task metrics."
+
::= { powerdns 2 }
powerdns OBJECT IDENTIFIER ::= { enterprises 43315 }
"Number of answers generated by dns64-prefix matching"
::= { stats 114 }
+almostExpiredPushed OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of almost-expired tasks pushed"
+ ::= { stats 115 }
+
+almostExpiredRun OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of almost-expired tasks run"
+ ::= { stats 116 }
+
+almostExpiredExceptions OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of almost-expired tasks that caused an exception"
+ ::= { stats 117 }
+
---
--- Traps / Notifications
---
Also note that unauthorized-tcp and unauthorized-udp packets do not end up in the 'questions' count.
+almost-expired-pushed
+^^^^^^^^^^^^^^^^^^^^^
+.. versionadded:: 4.6
+
+number of almost-expired tasks pushed
+
+almost-expired-run
+^^^^^^^^^^^^^^^^^^
+.. versionadded:: 4.6
+
+number of almost-expired tasks run
+
+almost-expired-exceptions
+^^^^^^^^^^^^^^^^^^^^^^^^^
+.. versionadded:: 4.6
+
+number of almost-expired tasks that caused an exception
+
aggressive-nsec-cache-entries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 4.5
static pdns::stat_t s_almost_expired_tasks_run;
static pdns::stat_t s_almost_expired_tasks_exceptions;
-static void resolve(const struct timeval &now, bool logErrors, const pdns::ResolveTask& task)
+static void resolve(const struct timeval& now, bool logErrors, const pdns::ResolveTask& task)
{
++s_almost_expired_tasks_run;
const string msg = "Exception while running a background ResolveTask";
{
return s_almost_expired_tasks_exceptions;
}
-
{ "cumul-auth6answers-count",
MetricDefinition(PrometheusMetricType::histogram,
"histogram of authoritative answer times over IPV6")},
+
+ { "almost-expired-pushed",
+ MetricDefinition(PrometheusMetricType::counter,
+ "number of almost-expired tasks pushed")},
+
+ { "almost-expired-run",
+ MetricDefinition(PrometheusMetricType::counter,
+ "number of almost-expired tasks run")},
+
+ { "almost-expired-exceptions",
+ MetricDefinition(PrometheusMetricType::counter,
+ "number of almost-expired tasks that caused an exception")},
};
#define CHECK_PROMETHEUS_METRICS 0