diff --git a/make-linux.mk b/make-linux.mk index ede843c5f..3b448afb0 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -311,7 +311,7 @@ endif ifeq ($(ZT_CONTROLLER),1) override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS) override LDLIBS+=-Lext/libpqxx-7.7.3/install/ubuntu22.04/lib -lpqxx -lpq ext/hiredis-1.0.2/lib/ubuntu22.04/libhiredis.a ext/redis-plus-plus-1.3.3/install/ubuntu22.04/lib/libredis++.a -lssl -lcrypto - override DEFS+=-DZT_CONTROLLER_USE_LIBPQ + override DEFS+=-DZT_CONTROLLER_USE_LIBPQ -DZT_NO_PEER_METRICS override INCLUDES+=-I/usr/include/postgresql -Iext/libpqxx-7.7.3/install/ubuntu22.04/include -Iext/hiredis-1.0.2/include/ -Iext/redis-plus-plus-1.3.3/install/ubuntu22.04/include/sw/ endif diff --git a/node/Metrics.cpp b/node/Metrics.cpp index 2b7591587..ba168bcc9 100644 --- a/node/Metrics.cpp +++ b/node/Metrics.cpp @@ -176,6 +176,7 @@ namespace ZeroTier { prometheus::simpleapi::counter_family_t network_packets { "zt_network_packets", "number of incoming/outgoing packets per network" }; +#ifndef ZT_NO_PEER_METRICS // PeerMetrics prometheus::CustomFamily> &peer_latency = prometheus::Builder>() @@ -189,6 +190,7 @@ namespace ZeroTier { { "zt_peer_packets", "number of packets to/from a peer" }; prometheus::simpleapi::counter_family_t peer_packet_errors { "zt_peer_packet_errors" , "number of incoming packet errors from a peer" }; +#endif // General Controller Metrics prometheus::simpleapi::gauge_metric_t network_count diff --git a/node/Metrics.hpp b/node/Metrics.hpp index 6d015c36d..66b97c0d6 100644 --- a/node/Metrics.hpp +++ b/node/Metrics.hpp @@ -107,11 +107,13 @@ namespace ZeroTier { extern prometheus::simpleapi::gauge_family_t network_num_multicast_groups; extern prometheus::simpleapi::counter_family_t network_packets; +#ifndef ZT_NO_PEER_METRICS // Peer Metrics extern prometheus::CustomFamily> &peer_latency; extern prometheus::simpleapi::gauge_family_t peer_path_count; extern prometheus::simpleapi::counter_family_t peer_packets; extern prometheus::simpleapi::counter_family_t peer_packet_errors; +#endif // General Controller Metrics extern prometheus::simpleapi::gauge_metric_t network_count;