]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/auth-carbon.cc
Merge pull request #6959 from Gibheer/master
[thirdparty/pdns.git] / pdns / auth-carbon.cc
index 325bac326e71bbd7656d8edadf2ce4aa4183f103..374b243ccdade2c28c6b226dca6f9b38fba18584 100644 (file)
@@ -38,6 +38,7 @@ try
   setThreadName("pdns/carbonDump");
   extern StatBag S;
 
+  string namespace_name=arg()["carbon-namespace"];
   string hostname=arg()["carbon-ourname"];
   if(hostname.empty()) {
     char tmp[80];
@@ -48,6 +49,7 @@ try
     hostname=tmp;
     boost::replace_all(hostname, ".", "_");
   }
+  string instance_name=arg()["carbon-instancename"];
 
   vector<string> carbonServers;
   stringtok(carbonServers, arg()["carbon-server"], ", ");
@@ -63,7 +65,7 @@ try
     ostringstream str;
     time_t now=time(0);
     for(const string& entry : entries) {
-      str<<"pdns."<<hostname<<".auth."<<entry<<' '<<S.read(entry)<<' '<<now<<"\r\n";
+      str<<namespace_name<<'.'<<hostname<<'.'<<instance_name<<'.'<<entry<<' '<<S.read(entry)<<' '<<now<<"\r\n";
     }
     msg = str.str();