From: Remi Gacogne Date: Fri, 10 Feb 2023 14:10:08 +0000 (+0100) Subject: dnsdist: Add prometheus type and help for 'cache_cleanup_count' X-Git-Tag: dnsdist-1.8.0-rc1~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=525f14f0b63e5c9391cdb4b9588d1adbf66b00c4;p=thirdparty%2Fpdns.git dnsdist: Add prometheus type and help for 'cache_cleanup_count' Also make sure that we test the caching metrics in our regression tests. --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 267c05561d..24546351a2 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -813,6 +813,8 @@ static void handlePrometheus(const YaHTTP::Request& req, YaHTTP::Response& resp) output << "# TYPE dnsdist_pool_cache_insert_collisions " << "counter" << "\n"; output << "# HELP dnsdist_pool_cache_ttl_too_shorts " << "Number of insertions into that cache skipped because the TTL of the answer was not long enough" << "\n"; output << "# TYPE dnsdist_pool_cache_ttl_too_shorts " << "counter" << "\n"; + output << "# HELP dnsdist_pool_cache_cleanup_count_total " << "Number of times the cache has been scanned to remove expired entries, if any" << "\n"; + output << "# TYPE dnsdist_pool_cache_cleanup_count_total " << "counter" << "\n"; for (const auto& entry : *localPools) { string poolName = entry.first; @@ -837,7 +839,7 @@ static void handlePrometheus(const YaHTTP::Request& req, YaHTTP::Response& resp) output << cachebase << "cache_lookup_collisions" <