From 11333fb02e17c3fac055a1474a655bf3486b956b Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 10 Nov 2015 15:34:06 +0100 Subject: [PATCH] Export dnsdist Downstream servers stats via carbon. --- pdns/dnsdist-carbon.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pdns/dnsdist-carbon.cc b/pdns/dnsdist-carbon.cc index 69ab9521a..3a83d1f49 100644 --- a/pdns/dnsdist-carbon.cc +++ b/pdns/dnsdist-carbon.cc @@ -56,6 +56,15 @@ try str<<(*boost::get(&e.second))(e.first); str<<' '<remote.toString(); + boost::replace_all(serverName, ".", "_"); + const string base = "dnsdist." + hostname + ".main.servers." + serverName + "."; + str<queries.load() << " " << now << "\r\n"; + str<reuseds.load() << " " << now << "\r\n"; + str<latencyUsec/1000.0 << " " << now << "\r\n"; + } const string msg = str.str(); int ret = waitForRWData(s.getHandle(), false, 1 , 0); -- 2.40.0