diff options
| author | Grant Limberg <[email protected]> | 2023-05-23 12:11:26 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-23 12:11:26 -0700 |
| commit | 17f6b3a10b1f1b3bc18c950f762d87fd64a8ce09 (patch) | |
| tree | 88b6cfd31b4c41cdd0feb41b783862e7f2c5f753 /node | |
| parent | da71e2524c343f563ea9c37e9668eec7c5719aaa (diff) | |
central controller metrics & request path updates (#2012)
* internal db metrics
* use shared mutexes for read/write locks
* remove this lock. only used for a metric
* more metrics
* remove exploratory metrics
place controller request benchmarks behind ifdef
Diffstat (limited to 'node')
| -rw-r--r-- | node/Metrics.cpp | 24 | ||||
| -rw-r--r-- | node/Metrics.hpp | 14 |
2 files changed, 38 insertions, 0 deletions
diff --git a/node/Metrics.cpp b/node/Metrics.cpp index 633c1b85..0b4d3495 100644 --- a/node/Metrics.cpp +++ b/node/Metrics.cpp @@ -215,6 +215,25 @@ namespace ZeroTier { prometheus::simpleapi::counter_metric_t sso_member_deauth { "controller_sso_timeouts", "number of sso timeouts" }; + prometheus::simpleapi::counter_metric_t network_config_request + { "controller_network_config_request", "count of config requests handled" }; + prometheus::simpleapi::gauge_metric_t network_config_request_threads + { "controller_network_config_request_threads", "number of active network config handling threads" }; + prometheus::simpleapi::counter_metric_t db_get_network + { "controller_db_get_network", "counter" }; + prometheus::simpleapi::counter_metric_t db_get_network_and_member + { "controller_db_get_network_and_member", "counter" }; + prometheus::simpleapi::counter_metric_t db_get_network_and_member_and_summary + { "controller_db_get_networK_and_member_summary", "counter" }; + prometheus::simpleapi::counter_metric_t db_get_member_list + { "controller_db_get_member_list", "counter" }; + prometheus::simpleapi::counter_metric_t db_get_network_list + { "controller_db_get_network_list", "counter" }; + prometheus::simpleapi::counter_metric_t db_member_change + { "controller_db_member_change", "counter" }; + prometheus::simpleapi::counter_metric_t db_network_change + { "controller_db_network_change", "counter" }; + #ifdef ZT_CONTROLLER_USE_LIBPQ // Central Controller Metrics prometheus::simpleapi::counter_metric_t pgsql_mem_notification @@ -223,6 +242,11 @@ namespace ZeroTier { { "controller_pgsql_network_notifications_received", "number of network change notifications received via pgsql NOTIFY" }; prometheus::simpleapi::counter_metric_t pgsql_node_checkin { "controller_pgsql_node_checkin_count", "number of node check-ins (pgsql)" }; + prometheus::simpleapi::counter_metric_t pgsql_commit_ticks + { "controller_pgsql_commit_ticks", "number of commit ticks run (pgsql)" }; + prometheus::simpleapi::counter_metric_t db_get_sso_info + { "controller_db_get_sso_info", "counter" }; + prometheus::simpleapi::counter_metric_t redis_mem_notification { "controller_redis_member_notifications_received", "number of member change notifications received via redis" }; prometheus::simpleapi::counter_metric_t redis_net_notification diff --git a/node/Metrics.hpp b/node/Metrics.hpp index 492a6f9e..055288f6 100644 --- a/node/Metrics.hpp +++ b/node/Metrics.hpp @@ -126,12 +126,26 @@ namespace ZeroTier { 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; + extern prometheus::simpleapi::counter_metric_t network_config_request; + extern prometheus::simpleapi::gauge_metric_t network_config_request_threads; + + extern prometheus::simpleapi::counter_metric_t db_get_network; + extern prometheus::simpleapi::counter_metric_t db_get_network_and_member; + extern prometheus::simpleapi::counter_metric_t db_get_network_and_member_and_summary; + extern prometheus::simpleapi::counter_metric_t db_get_member_list; + extern prometheus::simpleapi::counter_metric_t db_get_network_list; + extern prometheus::simpleapi::counter_metric_t db_member_change; + extern prometheus::simpleapi::counter_metric_t db_network_change; + #ifdef ZT_CONTROLLER_USE_LIBPQ // Central Controller Metrics extern prometheus::simpleapi::counter_metric_t pgsql_mem_notification; extern prometheus::simpleapi::counter_metric_t pgsql_net_notification; extern prometheus::simpleapi::counter_metric_t pgsql_node_checkin; + extern prometheus::simpleapi::counter_metric_t pgsql_commit_ticks; + extern prometheus::simpleapi::counter_metric_t db_get_sso_info; + extern prometheus::simpleapi::counter_metric_t redis_mem_notification; extern prometheus::simpleapi::counter_metric_t redis_net_notification; extern prometheus::simpleapi::counter_metric_t redis_node_checkin; |
