|
58 | 58 |
|
59 | 59 | -define(METRICS_RAW, [
|
60 | 60 |
|
61 |
| -%%% Those are global, i.e. they contain no reference to queue/vhost/channel |
| 61 | + %% Global metrics, as in, they contain no references to queues, virtual hosts or channel |
62 | 62 | {connection_churn_metrics, [
|
63 | 63 | {2, undefined, connections_opened_total, counter, "Total number of connections opened"},
|
64 | 64 | {3, undefined, connections_closed_total, counter, "Total number of connections closed or terminated"},
|
|
89 | 89 | {2, ?MILLISECOND, erlang_uptime_seconds, gauge, "Node uptime", uptime}
|
90 | 90 | ]},
|
91 | 91 |
|
| 92 | + {node_memory, [ |
| 93 | + {2, undefined, memory_code_module_bytes, gauge, "Code module memory footprint", code}, |
| 94 | + {2, undefined, memory_client_connection_reader_bytes, gauge, "Client connection reader processes footprint in bytes", connection_readers}, |
| 95 | + {2, undefined, memory_client_connection_writer_bytes, gauge, "Client connection writer processes footprint in bytes", connection_writers}, |
| 96 | + {2, undefined, memory_client_connection_channel_bytes, gauge, "Client connection channel processes footprint in bytes", connection_channels}, |
| 97 | + {2, undefined, memory_client_connection_other_bytes, gauge, "Client connection other processes footprint in bytes", connection_other}, |
| 98 | + {2, undefined, memory_classic_queue_erlang_process_bytes, gauge, "Classic queue processes footprint in bytes", queue_procs}, |
| 99 | + {2, undefined, memory_quorum_queue_erlang_process_bytes, gauge, "Quorum queue processes footprint in bytes", quorum_queue_procs}, |
| 100 | + {2, undefined, memory_quorum_queue_dlx_erlang_process_bytes, gauge, "Quorum queue DLX worker processes footprint in bytes", quorum_queue_dlx_procs}, |
| 101 | + {2, undefined, memory_stream_erlang_process_bytes, gauge, "Stream processes footprint in bytes", stream_queue_procs}, |
| 102 | + {2, undefined, memory_stream_replica_reader_erlang_process_bytes, gauge, "Stream replica reader processes footprint in bytes", stream_queue_replica_reader_procs}, |
| 103 | + {2, undefined, memory_stream_coordinator_erlang_process_bytes, gauge, "Stream coordinator processes footprint in bytes", stream_queue_coordinator_procs}, |
| 104 | + {2, undefined, memory_plugin_bytes, gauge, "Total plugin footprint in bytes", plugins}, |
| 105 | + {2, undefined, memory_modern_metadata_store_bytes, gauge, "Modern metadata store footprint in bytes", metadata_store}, |
| 106 | + {2, undefined, memory_other_erlang_process_bytes, gauge, "Other processes footprint in bytes", other_proc}, |
| 107 | + {2, undefined, memory_metrics_bytes, gauge, "Metric table footprint in bytes", metrics}, |
| 108 | + {2, undefined, memory_management_stats_db_bytes, gauge, "Management stats database footprint in bytes", mgmt_db}, |
| 109 | + {2, undefined, memory_classic_metadata_store_bytes, gauge, "Classic metadata store footprint in bytes", mnesia}, |
| 110 | + {2, undefined, memory_quorum_queue_ets_table_bytes, gauge, "Quorum queue ETS tables footprint in bytes", quorum_ets}, |
| 111 | + {2, undefined, memory_modern_metadata_store_ets_table_bytes, gauge, "Modern metadata store ETS tables footprint in bytes", metadata_store_ets}, |
| 112 | + {2, undefined, memory_other_ets_table_bytes, gauge, "Other ETS tables footprint in bytes", other_ets}, |
| 113 | + {2, undefined, memory_binary_heap_bytes, gauge, "Binary heap size in bytes", binary}, |
| 114 | + {2, undefined, memory_message_index_bytes, gauge, "Message index footprint in bytes", msg_index}, |
| 115 | + {2, undefined, memory_atom_table_bytes, gauge, "Atom table size in bytes", atom}, |
| 116 | + {2, undefined, memory_other_system_bytes, gauge, "Other runtime footprint in bytes", other_system}, |
| 117 | + {2, undefined, memory_runtime_allocated_unused_bytes, gauge, "Runtime allocated but unused blocks size in bytes", allocated_unused}, |
| 118 | + {2, undefined, memory_runtime_reserved_unallocated_bytes, gauge, "Runtime reserved but unallocated blocks size in bytes", reserved_unallocated} |
| 119 | + ]}, |
| 120 | + |
92 | 121 | {node_persister_metrics, [
|
93 | 122 | {2, undefined, io_read_ops_total, counter, "Total number of I/O read operations", io_read_count},
|
94 | 123 | {2, undefined, io_read_bytes_total, counter, "Total number of I/O bytes read", io_read_bytes},
|
|
130 | 159 | {4, undefined, auth_attempts_detailed_failed_total, counter, "Total number of failed authentication attempts with source info"}
|
131 | 160 | ]},
|
132 | 161 |
|
133 |
| -%%% Those metrics have reference only to a queue name. This is the only group where filtering (e.g. by vhost) makes sense. |
| 162 | + %%% These metrics only reference a queue name. This is the only group where filtering (e.g. by vhost) makes sense. |
134 | 163 | {queue_coarse_metrics, [
|
135 | 164 | {2, undefined, queue_messages_ready, gauge, "Messages ready to be delivered to consumers"},
|
136 | 165 | {3, undefined, queue_messages_unacked, gauge, "Messages delivered to consumers but not yet acknowledged"},
|
@@ -630,6 +659,38 @@ get_data(vhost_status, _, _, _) ->
|
630 | 659 | false -> 0
|
631 | 660 | end}
|
632 | 661 | || VHost <- rabbit_vhost:list() ];
|
| 662 | +get_data(node_memory, _, _, _) -> |
| 663 | + BreakdownPL = rabbit_vm:memory(), |
| 664 | + KeysOfInterest = [ |
| 665 | + code, |
| 666 | + connection_readers, |
| 667 | + connection_writers, |
| 668 | + connection_channels, |
| 669 | + connection_other, |
| 670 | + queue_procs, |
| 671 | + quorum_queue_procs, |
| 672 | + quorum_queue_dlx_procs, |
| 673 | + stream_queue_procs, |
| 674 | + stream_queue_replica_reader_procs, |
| 675 | + stream_queue_coordinator_procs, |
| 676 | + plugins, |
| 677 | + metadata_store, |
| 678 | + other_proc, |
| 679 | + metrics, |
| 680 | + mgmt_db, |
| 681 | + mnesia, |
| 682 | + quorum_ets, |
| 683 | + metadata_store_ets, |
| 684 | + other_ets, |
| 685 | + binary, |
| 686 | + msg_index, |
| 687 | + atom, |
| 688 | + other_system, |
| 689 | + allocated_unused, |
| 690 | + reserved_unallocated |
| 691 | + ], |
| 692 | + Data = maps:to_list(maps:with(KeysOfInterest, maps:from_list(BreakdownPL))), |
| 693 | + [{node_memory, Data}]; |
633 | 694 | get_data(exchange_bindings, _, _, _) ->
|
634 | 695 | Exchanges = lists:foldl(fun
|
635 | 696 | (#exchange{internal = true}, Acc) ->
|
|
0 commit comments