Skip to content

Commit

Permalink
Merge pull request #7007 from Line-Rate-Development/prometheus_active…
Browse files Browse the repository at this point in the history
…_servers

dnsdist: export Prometheus metric about number of alive servers in pool
  • Loading branch information
Habbie committed Oct 3, 2018
2 parents 86c3858 + 5040e50 commit e074f16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pdns/dnsdist-web.cc
Expand Up @@ -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;
Expand Down

0 comments on commit e074f16

Please sign in to comment.