Merge pull request #10859 from terry-xiaoyu/add-live-connections-in-nodes-api

feat: add 'live_connections' field in the /nodes API
This commit is contained in:
Xinyu Liu 2023-05-30 10:25:14 +08:00 committed by GitHub
commit 52b269a680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{application, emqx_management,
[{description, "EMQX Management API and CLI"},
{vsn, "4.4.14"}, % strict semver, bump manually!
{vsn, "4.4.15"}, % strict semver, bump manually!
{modules, []},
{registered, [emqx_management_sup]},
{applications, [kernel,stdlib,emqx_plugin_libs,minirest]},

View File

@ -152,6 +152,7 @@ node_info(Node) when Node =:= node() ->
max_fds => proplists:get_value(max_fds,
lists:usort(lists:flatten(erlang:system_info(check_io)))),
connections => ets:info(emqx_channel, size),
live_connections => emqx_cm:get_connected_client_count(),
node_status => 'Running',
uptime => iolist_to_binary(proplists:get_value(uptime, BrokerInfo)),
version => iolist_to_binary(proplists:get_value(version, BrokerInfo))