diff options
| author | Grant Limberg <[email protected]> | 2023-05-16 11:56:58 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-16 11:56:58 -0700 |
| commit | adfbbc3fb00becc578afc0645c60b1de3d84bb4c (patch) | |
| tree | 1bc22da8a3a9ac7db73482e903450834a400e044 /node | |
| parent | f621261ff919278d631d566591a2eaf7c4c918d8 (diff) | |
Controller Metrics & Network Config Request Fix (#2003)
* add new metrics for network config request queue size and sso expirations
* move sso expiration to its own thread in the controller
* fix potential undefined behavior when modifying a set
Diffstat (limited to 'node')
| -rw-r--r-- | node/Metrics.cpp | 9 | ||||
| -rw-r--r-- | node/Metrics.hpp | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/node/Metrics.cpp b/node/Metrics.cpp index 62345476..633c1b85 100644 --- a/node/Metrics.cpp +++ b/node/Metrics.cpp @@ -206,6 +206,15 @@ namespace ZeroTier { prometheus::simpleapi::counter_metric_t member_deauths {"controller_member_deauth_count", "number of network member deauths"}; + prometheus::simpleapi::gauge_metric_t network_config_request_queue_size + { "controller_network_config_request_queue", "number of entries in the request queue for network configurations" }; + + prometheus::simpleapi::counter_metric_t sso_expiration_checks + { "controller_sso_expiration_checks", "number of sso expiration checks done" }; + + prometheus::simpleapi::counter_metric_t sso_member_deauth + { "controller_sso_timeouts", "number of sso timeouts" }; + #ifdef ZT_CONTROLLER_USE_LIBPQ // Central Controller Metrics prometheus::simpleapi::counter_metric_t pgsql_mem_notification diff --git a/node/Metrics.hpp b/node/Metrics.hpp index 66b97c0d..492a6f9e 100644 --- a/node/Metrics.hpp +++ b/node/Metrics.hpp @@ -123,6 +123,10 @@ namespace ZeroTier { extern prometheus::simpleapi::counter_metric_t member_auths; extern prometheus::simpleapi::counter_metric_t member_deauths; + extern prometheus::simpleapi::gauge_metric_t network_config_request_queue_size; + extern prometheus::simpleapi::counter_metric_t sso_expiration_checks; + extern prometheus::simpleapi::counter_metric_t sso_member_deauth; + #ifdef ZT_CONTROLLER_USE_LIBPQ // Central Controller Metrics extern prometheus::simpleapi::counter_metric_t pgsql_mem_notification; @@ -132,6 +136,8 @@ namespace ZeroTier { extern prometheus::simpleapi::counter_metric_t redis_net_notification; extern prometheus::simpleapi::counter_metric_t redis_node_checkin; + + // Central DB Pool Metrics extern prometheus::simpleapi::counter_metric_t conn_counter; extern prometheus::simpleapi::counter_metric_t max_pool_size; |
