]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsdist-carbon.cc
rec: ensure correct service user on debian
[thirdparty/pdns.git] / pdns / dnsdist-carbon.cc
index 1fa49f58468010255209bff4ab789ac568a073d8..14b72e048e676645c7aa47c339bbd16ea494f2cf 100644 (file)
@@ -146,6 +146,39 @@ try
           }
         }
 
+#ifdef HAVE_DNS_OVER_HTTPS
+        {
+          const string base = "dnsdist." + hostname + ".main.doh.";
+          for(const auto& doh : g_dohlocals) {
+            string name = doh->d_local.toStringWithPort();
+            boost::replace_all(name, ".", "_");
+            boost::replace_all(name, ":", "_");
+            boost::replace_all(name, "[", "_");
+            boost::replace_all(name, "]", "_");
+
+            vector<pair<const char*, const std::atomic<uint64_t>&>> v{
+              {"http-connects", doh->d_httpconnects},
+              {"http1-queries", doh->d_http1queries},
+              {"http2-queries", doh->d_http2queries},
+              {"tls10-queries", doh->d_tls10queries},
+              {"tls11-queries", doh->d_tls11queries},
+              {"tls12-queries", doh->d_tls12queries},
+              {"tls13-queries", doh->d_tls13queries},
+              {"tls-unknown-queries", doh->d_tlsUnknownqueries},
+              {"get-queries", doh->d_getqueries},
+              {"post-queries", doh->d_postqueries},
+              {"bad-requests", doh->d_badrequests},
+              {"error-responses", doh->d_errorresponses},
+              {"valid-responses", doh->d_validresponses}
+            };
+
+            for(const auto& item : v) {
+              str<<base<<name<<"."<<item.first << " " << item.second << " " << now <<"\r\n";
+            }
+          }
+        }
+#endif /* HAVE_DNS_OVER_HTTPS */
+
         {
           WriteLock wl(&g_qcount.queryLock);
           std::string qname;