{"post-queries", doh->d_postqueries},
{"bad-requests", doh->d_badrequests},
{"error-responses", doh->d_errorresponses},
+ {"redirect-responses", doh->d_redirectresponses},
{"valid-responses", doh->d_validresponses}
};
setLuaNoSideEffect();
try {
ostringstream ret;
- boost::format fmt("%-3d %-20.20s %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d");
- ret << (fmt % "#" % "Address" % "HTTP" % "HTTP/1" % "HTTP/2" % "TLS 1.0" % "TLS 1.1" % "TLS 1.2" % "TLS 1.3" % "TLS other" % "GET" % "POST" % "Bad" % "Errors" % "Valid") << endl;
+ boost::format fmt("%-3d %-20.20s %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d %-15d");
+ ret << (fmt % "#" % "Address" % "HTTP" % "HTTP/1" % "HTTP/2" % "TLS 1.0" % "TLS 1.1" % "TLS 1.2" % "TLS 1.3" % "TLS other" % "GET" % "POST" % "Bad" % "Errors" % "Redirects" % "Valid") << endl;
size_t counter = 0;
for (const auto& ctx : g_dohlocals) {
- ret << (fmt % counter % ctx->d_local.toStringWithPort() % ctx->d_httpconnects % ctx->d_http1Stats.d_nbQueries % ctx->d_http1Stats.d_nbQueries % ctx->d_tls10queries % ctx->d_tls11queries % ctx->d_tls12queries % ctx->d_tls13queries % ctx->d_tlsUnknownqueries % ctx->d_getqueries % ctx->d_postqueries % ctx->d_badrequests % ctx->d_errorresponses % ctx->d_validresponses) << endl;
+ ret << (fmt % counter % ctx->d_local.toStringWithPort() % ctx->d_httpconnects % ctx->d_http1Stats.d_nbQueries % ctx->d_http1Stats.d_nbQueries % ctx->d_tls10queries % ctx->d_tls11queries % ctx->d_tls12queries % ctx->d_tls13queries % ctx->d_tlsUnknownqueries % ctx->d_getqueries % ctx->d_postqueries % ctx->d_badrequests % ctx->d_errorresponses % ctx->d_redirectresponses %ctx->d_validresponses) << endl;
counter++;
}
g_outputBuffer = ret.str();
output << "# TYPE " << dohfrontsbase << "bad_requests " << "counter" << "\n";
output << "# HELP " << dohfrontsbase << "error_responses " << "Number of responses sent by dnsdist indicating an error" << "\n";
output << "# TYPE " << dohfrontsbase << "error_responses " << "counter" << "\n";
+ output << "# HELP " << dohfrontsbase << "redirect_responses " << "Number of responses sent by dnsdist indicating a redirect" << "\n";
+ output << "# TYPE " << dohfrontsbase << "redirect_responses " << "counter" << "\n";
output << "# HELP " << dohfrontsbase << "valid_responses " << "Number of valid responses sent by dnsdist" << "\n";
output << "# TYPE " << dohfrontsbase << "valid_responses " << "counter" << "\n";
output << "# HELP " << dohfrontsbase << "http1_queries " << "Number of queries received over HTTP/1.x" << "\n";
output << dohfrontsbase << "post_queries" << label << doh->d_postqueries << "\n";
output << dohfrontsbase << "bad_requests" << label << doh->d_badrequests << "\n";
output << dohfrontsbase << "error_responses" << label << doh->d_errorresponses << "\n";
+ output << dohfrontsbase << "redirect_responses" << label << doh->d_redirectresponses << "\n";
output << dohfrontsbase << "valid_responses" << label << doh->d_validresponses << "\n";
output << dohfrontsbase << "http1_queries" << label << doh->d_http1Stats.d_nbQueries << "\n";
{ "post-queries", (double) doh->d_postqueries },
{ "bad-requests", (double) doh->d_badrequests },
{ "error-responses", (double) doh->d_errorresponses },
+ { "redirect-responses", (double) doh->d_redirectresponses },
{ "valid-responses", (double) doh->d_validresponses }
};
dohs.push_back(obj);