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:
commit
52b269a680
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_management,
|
{application, emqx_management,
|
||||||
[{description, "EMQX Management API and CLI"},
|
[{description, "EMQX Management API and CLI"},
|
||||||
{vsn, "4.4.14"}, % strict semver, bump manually!
|
{vsn, "4.4.15"}, % strict semver, bump manually!
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_management_sup]},
|
{registered, [emqx_management_sup]},
|
||||||
{applications, [kernel,stdlib,emqx_plugin_libs,minirest]},
|
{applications, [kernel,stdlib,emqx_plugin_libs,minirest]},
|
||||||
|
|
|
@ -152,6 +152,7 @@ node_info(Node) when Node =:= node() ->
|
||||||
max_fds => proplists:get_value(max_fds,
|
max_fds => proplists:get_value(max_fds,
|
||||||
lists:usort(lists:flatten(erlang:system_info(check_io)))),
|
lists:usort(lists:flatten(erlang:system_info(check_io)))),
|
||||||
connections => ets:info(emqx_channel, size),
|
connections => ets:info(emqx_channel, size),
|
||||||
|
live_connections => emqx_cm:get_connected_client_count(),
|
||||||
node_status => 'Running',
|
node_status => 'Running',
|
||||||
uptime => iolist_to_binary(proplists:get_value(uptime, BrokerInfo)),
|
uptime => iolist_to_binary(proplists:get_value(uptime, BrokerInfo)),
|
||||||
version => iolist_to_binary(proplists:get_value(version, BrokerInfo))
|
version => iolist_to_binary(proplists:get_value(version, BrokerInfo))
|
||||||
|
|
Loading…
Reference in New Issue