]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Export Prometheus metric about number of alive servers in pool 7007/head
authorPavel Odintsov <pavel@cloudflare.com>
Mon, 1 Oct 2018 13:51:23 +0000 (14:51 +0100)
committerPavel Odintsov <pavel@cloudflare.com>
Mon, 1 Oct 2018 13:51:23 +0000 (14:51 +0100)
pdns/dnsdist-web.cc

index e2e756c8ea629e95807d0f8845cf8552f64f6641..dc9c5545f27efa9dba87f91f47f5fbc9f44f4de7 100644 (file)
@@ -475,6 +475,7 @@ static void connectionThread(int sock, ComboAddress remote, string password, str
           const string label = "{pool=\"" + poolName + "\"}";
           const std::shared_ptr<ServerPool> pool = entry.second;
           output << "dnsdist_pool_servers" << label << " " << pool->countServers(false) << "\n";
+          output << "dnsdist_pool_active_servers" << label << " " << pool->countServers(true) << "\n";
 
           if (pool->packetCache != nullptr) {
             const auto& cache = pool->packetCache;