Skip to content

Commit 75684a3

Browse files
committed
Remove sockets_used/total from HTTP API
1 parent ed0bb18 commit 75684a3

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

deps/rabbitmq_management/src/rabbit_mgmt_stats.erl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,13 @@ format_rate(Type, {TR, TU, TM}, {RR, RU, RM}) when Type =:= queue_msg_stats;
252252
{messages, TM},
253253
{messages_details, [{rate, RM}]}
254254
];
255-
format_rate(node_coarse_stats, {TF, TS, TM, TD, TP, TGC, TGCW, TCS},
256-
{RF, RS, RM, RD, RP, RGC, RGCW, RCS}) ->
255+
format_rate(node_coarse_stats, {TF, _TS, TM, TD, TP, TGC, TGCW, TCS},
256+
{RF, _RS, RM, RD, RP, RGC, RGCW, RCS}) ->
257257
[
258258
{mem_used, TM},
259259
{mem_used_details, [{rate, RM}]},
260260
{fd_used, TF},
261261
{fd_used_details, [{rate, RF}]},
262-
{sockets_used, TS},
263-
{sockets_used_details, [{rate, RS}]},
264262
{proc_used, TP},
265263
{proc_used_details, [{rate, RP}]},
266264
{disk_free, TD},
@@ -476,20 +474,17 @@ format_rate(Type, {TR, TU, TM}, {RR, RU, RM}, {SR, SU, SM}, {STR, STU, STM},
476474
{messages_details, [{rate, RM},
477475
{samples, SM}] ++ average(SM, STM, Length)}
478476
];
479-
format_rate(node_coarse_stats, {TF, TS, TM, TD, TP, TGC, TGCW, TCS},
480-
{RF, RS, RM, RD, RP, RGC, RGCW, RCS},
481-
{SF, SS, SM, SD, SP, SGC, SGCW, SCS},
482-
{STF, STS, STM, STD, STP, STGC, STGCW, STCS}, Length) ->
477+
format_rate(node_coarse_stats, {TF, _TS, TM, TD, TP, TGC, TGCW, TCS},
478+
{RF, _RS, RM, RD, RP, RGC, RGCW, RCS},
479+
{SF, _SS, SM, SD, SP, SGC, SGCW, SCS},
480+
{STF, _STS, STM, STD, STP, STGC, STGCW, STCS}, Length) ->
483481
[
484482
{mem_used, TM},
485483
{mem_used_details, [{rate, RM},
486484
{samples, SM}] ++ average(SM, STM, Length)},
487485
{fd_used, TF},
488486
{fd_used_details, [{rate, RF},
489487
{samples, SF}] ++ average(SF, STF, Length)},
490-
{sockets_used, TS},
491-
{sockets_used_details, [{rate, RS},
492-
{samples, SS}] ++ average(SS, STS, Length)},
493488
{proc_used, TP},
494489
{proc_used_details, [{rate, RP},
495490
{samples, SP}] ++ average(SP, STP, Length)},

deps/rabbitmq_management_agent/src/rabbit_mgmt_external_stats.erl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
-export([list_registry_plugins/1]).
1717

18-
-define(METRICS_KEYS, [fd_used, sockets_used, mem_used, disk_free, proc_used, gc_num,
18+
-define(METRICS_KEYS, [fd_used, mem_used, disk_free, proc_used, gc_num,
1919
gc_bytes_reclaimed, context_switches]).
2020

2121
-define(PERSISTER_KEYS, [persister_stats]).
2222

23-
-define(OTHER_KEYS, [name, partitions, os_pid, fd_total, sockets_total, mem_limit,
23+
-define(OTHER_KEYS, [name, partitions, os_pid, fd_total, mem_limit,
2424
mem_alarm, disk_free_limit, disk_free_alarm, proc_total,
2525
rates_mode, uptime, run_queue, processors, exchange_types,
2626
auth_mechanisms, applications, contexts, log_files,
@@ -195,11 +195,6 @@ i(fd_used, State) ->
195195
get_used_fd(State);
196196
i(fd_total, #state{fd_total = FdTotal}=State) ->
197197
{State, FdTotal};
198-
%% sockets_used and sockets_total are unused since RabbitMQ 4.0.
199-
i(sockets_used, State) ->
200-
{State, 0};
201-
i(sockets_total, State) ->
202-
{State, 0};
203198
i(os_pid, State) ->
204199
{State, rabbit_data_coercion:to_utf8_binary(os:getpid())};
205200
i(mem_used, State) ->

0 commit comments

Comments
 (0)