From 646a7b1ed44decdb6aff868633419dbf3f3d95d1 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 23 Dec 2025 16:07:51 +0100 Subject: Add remote address to stats --- src/ManagementServer.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/ManagementServer.h') diff --git a/src/ManagementServer.h b/src/ManagementServer.h index a721550..2010907 100644 --- a/src/ManagementServer.h +++ b/src/ManagementServer.h @@ -52,6 +52,7 @@ #endif #include "zmq.hpp" +#include "Socket.h" #include #include #include @@ -170,7 +171,9 @@ class ManagementServer void register_input(InputStat* is); void unregister_input(std::string id); - void update_edi_tcp_output_stat(uint16_t listen_port, size_t num_connections); + void update_edi_tcp_output_stat( + uint16_t listen_port, + const std::vector& stats); /* Load a ptree given by the management server. * @@ -212,7 +215,8 @@ class ManagementServer std::map m_input_stats; // Holds information about EDI/TCP outputs - std::map m_output_stats; + std::map> m_output_stats; /* Return a description of the configuration that will * allow to define what graphs to be created @@ -227,7 +231,11 @@ class ManagementServer */ json::map_t get_input_values() const; - json::map_t get_output_values() const; + struct output_stats { + json::map_t values; + size_t total_num_connections = 0; + }; + output_stats get_output_values() const; // mutex for accessing the map mutable std::mutex m_statsmutex; -- cgit v1.2.3