Add prometheus support

This commit is contained in:
avigailo
2025-04-09 22:06:45 +03:00
parent 2c6b6baa3b
commit 9e85e5703c
18 changed files with 746 additions and 6 deletions

View File

@@ -163,15 +163,13 @@ RestServer::Impl::init()
}
}
bool is_ipv6 = false;
if (accept_get_from_external_ip) {
is_ipv6 = true;
bool is_ipv6 = getProfileAgentSettingWithDefault(false, "enable_ipv6");
if (is_ipv6) {
fd = socket(AF_INET6, SOCK_STREAM, 0);
}
if (fd == -1) {
} else {
fd = socket(AF_INET, SOCK_STREAM, 0);
is_ipv6 = false;
}
dbgAssert(fd >= 0) << alert << "Failed to open a socket";
int socket_enable = 1;