|
86 | 86 | {2, ?MILLISECOND, erlang_uptime_seconds, gauge, "Node uptime", uptime}
|
87 | 87 | ]},
|
88 | 88 |
|
89 |
| - {node_memory, [ |
90 |
| - {2, undefined, memory_code_module_bytes, gauge, "Code module memory footprint", code}, |
91 |
| - {2, undefined, memory_client_connection_reader_bytes, gauge, "Client connection reader processes footprint in bytes", connection_readers}, |
92 |
| - {2, undefined, memory_client_connection_writer_bytes, gauge, "Client connection writer processes footprint in bytes", connection_writers}, |
93 |
| - {2, undefined, memory_client_connection_channel_bytes, gauge, "Client connection channel processes footprint in bytes", connection_channels}, |
94 |
| - {2, undefined, memory_client_connection_other_bytes, gauge, "Client connection other processes footprint in bytes", connection_other}, |
95 |
| - {2, undefined, memory_classic_queue_erlang_process_bytes, gauge, "Classic queue processes footprint in bytes", queue_procs}, |
96 |
| - {2, undefined, memory_quorum_queue_erlang_process_bytes, gauge, "Quorum queue processes footprint in bytes", quorum_queue_procs}, |
97 |
| - {2, undefined, memory_quorum_queue_dlx_erlang_process_bytes, gauge, "Quorum queue DLX worker processes footprint in bytes", quorum_queue_dlx_procs}, |
98 |
| - {2, undefined, memory_stream_erlang_process_bytes, gauge, "Stream processes footprint in bytes", stream_queue_procs}, |
99 |
| - {2, undefined, memory_stream_replica_reader_erlang_process_bytes, gauge, "Stream replica reader processes footprint in bytes", stream_queue_replica_reader_procs}, |
100 |
| - {2, undefined, memory_stream_coordinator_erlang_process_bytes, gauge, "Stream coordinator processes footprint in bytes", stream_queue_coordinator_procs}, |
101 |
| - {2, undefined, memory_plugin_bytes, gauge, "Total plugin footprint in bytes", plugins}, |
102 |
| - {2, undefined, memory_modern_metadata_store_bytes, gauge, "Modern metadata store footprint in bytes", metadata_store}, |
103 |
| - {2, undefined, memory_other_erlang_process_bytes, gauge, "Other processes footprint in bytes", other_proc}, |
104 |
| - {2, undefined, memory_metrics_bytes, gauge, "Metric table footprint in bytes", metrics}, |
105 |
| - {2, undefined, memory_management_stats_db_bytes, gauge, "Management stats database footprint in bytes", mgmt_db}, |
106 |
| - {2, undefined, memory_classic_metadata_store_bytes, gauge, "Classic metadata store footprint in bytes", mnesia}, |
107 |
| - {2, undefined, memory_quorum_queue_ets_table_bytes, gauge, "Quorum queue ETS tables footprint in bytes", quorum_ets}, |
108 |
| - {2, undefined, memory_modern_metadata_store_ets_table_bytes, gauge, "Modern metadata store ETS tables footprint in bytes", metadata_store_ets}, |
109 |
| - {2, undefined, memory_other_ets_table_bytes, gauge, "Other ETS tables footprint in bytes", other_ets}, |
110 |
| - {2, undefined, memory_binary_heap_bytes, gauge, "Binary heap size in bytes", binary}, |
111 |
| - {2, undefined, memory_message_index_bytes, gauge, "Message index footprint in bytes", msg_index}, |
112 |
| - {2, undefined, memory_atom_table_bytes, gauge, "Atom table size in bytes", atom}, |
113 |
| - {2, undefined, memory_other_system_bytes, gauge, "Other runtime footprint in bytes", other_system}, |
114 |
| - {2, undefined, memory_runtime_allocated_unused_bytes, gauge, "Runtime allocated but unused blocks size in bytes", allocated_unused}, |
115 |
| - {2, undefined, memory_runtime_reserved_unallocated_bytes, gauge, "Runtime reserved but unallocated blocks size in bytes", reserved_unallocated} |
116 |
| - ]}, |
117 |
| - |
118 | 89 | {node_persister_metrics, [
|
119 | 90 | {2, undefined, io_read_ops_total, counter, "Total number of I/O read operations", io_read_count},
|
120 | 91 | {2, undefined, io_read_bytes_total, counter, "Total number of I/O bytes read", io_read_bytes},
|
|
277 | 248 | ]}
|
278 | 249 | ]).
|
279 | 250 |
|
| 251 | +-define(METRICS_MEMORY_BREAKDOWN, [ |
| 252 | + {node_memory, [ |
| 253 | + {2, undefined, memory_code_module_bytes, gauge, "Code module memory footprint", code}, |
| 254 | + {2, undefined, memory_client_connection_reader_bytes, gauge, "Client connection reader processes footprint in bytes", connection_readers}, |
| 255 | + {2, undefined, memory_client_connection_writer_bytes, gauge, "Client connection writer processes footprint in bytes", connection_writers}, |
| 256 | + {2, undefined, memory_client_connection_channel_bytes, gauge, "Client connection channel processes footprint in bytes", connection_channels}, |
| 257 | + {2, undefined, memory_client_connection_other_bytes, gauge, "Client connection other processes footprint in bytes", connection_other}, |
| 258 | + {2, undefined, memory_classic_queue_erlang_process_bytes, gauge, "Classic queue processes footprint in bytes", queue_procs}, |
| 259 | + {2, undefined, memory_quorum_queue_erlang_process_bytes, gauge, "Quorum queue processes footprint in bytes", quorum_queue_procs}, |
| 260 | + {2, undefined, memory_quorum_queue_dlx_erlang_process_bytes, gauge, "Quorum queue DLX worker processes footprint in bytes", quorum_queue_dlx_procs}, |
| 261 | + {2, undefined, memory_stream_erlang_process_bytes, gauge, "Stream processes footprint in bytes", stream_queue_procs}, |
| 262 | + {2, undefined, memory_stream_replica_reader_erlang_process_bytes, gauge, "Stream replica reader processes footprint in bytes", stream_queue_replica_reader_procs}, |
| 263 | + {2, undefined, memory_stream_coordinator_erlang_process_bytes, gauge, "Stream coordinator processes footprint in bytes", stream_queue_coordinator_procs}, |
| 264 | + {2, undefined, memory_plugin_bytes, gauge, "Total plugin footprint in bytes", plugins}, |
| 265 | + {2, undefined, memory_modern_metadata_store_bytes, gauge, "Modern metadata store footprint in bytes", metadata_store}, |
| 266 | + {2, undefined, memory_other_erlang_process_bytes, gauge, "Other processes footprint in bytes", other_proc}, |
| 267 | + {2, undefined, memory_metrics_bytes, gauge, "Metric table footprint in bytes", metrics}, |
| 268 | + {2, undefined, memory_management_stats_db_bytes, gauge, "Management stats database footprint in bytes", mgmt_db}, |
| 269 | + {2, undefined, memory_classic_metadata_store_bytes, gauge, "Classic metadata store footprint in bytes", mnesia}, |
| 270 | + {2, undefined, memory_quorum_queue_ets_table_bytes, gauge, "Quorum queue ETS tables footprint in bytes", quorum_ets}, |
| 271 | + {2, undefined, memory_modern_metadata_store_ets_table_bytes, gauge, "Modern metadata store ETS tables footprint in bytes", metadata_store_ets}, |
| 272 | + {2, undefined, memory_other_ets_table_bytes, gauge, "Other ETS tables footprint in bytes", other_ets}, |
| 273 | + {2, undefined, memory_binary_heap_bytes, gauge, "Binary heap size in bytes", binary}, |
| 274 | + {2, undefined, memory_message_index_bytes, gauge, "Message index footprint in bytes", msg_index}, |
| 275 | + {2, undefined, memory_atom_table_bytes, gauge, "Atom table size in bytes", atom}, |
| 276 | + {2, undefined, memory_other_system_bytes, gauge, "Other runtime footprint in bytes", other_system}, |
| 277 | + {2, undefined, memory_runtime_allocated_unused_bytes, gauge, "Runtime allocated but unused blocks size in bytes", allocated_unused}, |
| 278 | + {2, undefined, memory_runtime_reserved_unallocated_bytes, gauge, "Runtime reserved but unallocated blocks size in bytes", reserved_unallocated} |
| 279 | + ]}]). |
| 280 | + |
280 | 281 | -define(TOTALS, [
|
281 | 282 | %% ordering differs from metrics above, refer to list comprehension
|
282 | 283 | {connection_created, connections, gauge, "Connections currently open"},
|
@@ -305,6 +306,10 @@ collect_mf('per-object', Callback) ->
|
305 | 306 | totals(Callback),
|
306 | 307 | emit_identity_info(Callback),
|
307 | 308 | ok;
|
| 309 | +collect_mf('memory-breakdown', Callback) -> |
| 310 | + collect(false, ?METRIC_NAME_PREFIX, false, ?METRICS_MEMORY_BREAKDOWN, Callback), |
| 311 | + emit_identity_info(Callback), |
| 312 | + ok; |
308 | 313 | collect_mf(_Registry, Callback) ->
|
309 | 314 | PerObjectMetrics = application:get_env(rabbitmq_prometheus, return_per_object_metrics, false),
|
310 | 315 | collect(PerObjectMetrics, ?METRIC_NAME_PREFIX, false, ?METRICS_RAW, Callback),
|
|
0 commit comments