config.instance_name = "recursor";
}
- registerAllStats();
PacketBuffer msg;
for (const auto& carbonServer : config.servers) {
ComboAddress remote(carbonServer, 2003);
SNMPAgent(name, masterSocket)
{
#ifdef HAVE_NET_SNMP
- /* This is done so that the statistics maps are
- initialized. */
- registerAllStats();
-
registerCounter64Stat("questions", questionsOID, OID_LENGTH(questionsOID));
registerCounter64Stat("ipv6-questions", ipv6QuestionsOID, OID_LENGTH(ipv6QuestionsOID));
registerCounter64Stat("tcp-questions", tcpQuestionsOID, OID_LENGTH(tcpQuestionsOID));
void registerAllStats()
{
- static std::once_flag s_once;
- std::call_once(s_once, []() {
- try {
- registerAllStats1();
- }
- catch (...) {
- g_log << Logger::Critical << "Could not add stat entries" << endl;
- exit(1);
- }
- });
+ try {
+ registerAllStats1();
+ }
+ catch (...) {
+ g_log << Logger::Critical << "Could not add stat entries" << endl;
+ exit(1);
+ }
}
void doExitGeneric(bool nicely)
if (req->method != "GET")
throw HttpMethodNotAllowedException();
- registerAllStats();
-
std::ostringstream output;
// Argument controls disabling of any stats. So
RecursorWebServer::RecursorWebServer(FDMultiplexer* fdm)
{
- registerAllStats();
-
#if CHECK_PROMETHEUS_METRICS
validatePrometheusMetrics();
#endif