Project: RabbitMQ (App Definition and Development / Streaming & Messaging)
File: metrics.md

<!-- TOC depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 --> - - - - - <!-- /TOC --> All metrics are in alphabetical order. These were introduced to address an inherent flaw with existing counters when metrics are aggregated (default behaviour). When connections or channels terminate, their metrics get garbage collected (meaning that they disappear after a while). All counters that aggregate metrics across connections and channels decrease, since the sum is now lower, and that in turn results rate & irate functions in Prometheus returning nonsensical values (e.g. 4Mil msg/s). This problem is made worse by Streams, since those values may be real, but we can't trust them, which is the worst place to be in. The Global counters fix this, and also introduce per-protocol as well as per-protocol AND queue type metrics, which is something that many of you have requested for a while now. <!-- To generate these: From within the rabbitmq-server repository, run the following command: make run-broker In vim, position the cursor where you want the metrics importing, then run: r !curl -s localhost:15692/metrics | grep 'HELP rabbitmqglobal' Also in vim, select all formatted lines and run: sort Still in vim, build & run a macro re-formats all other metrics Lastly, visual select all lines in vim and run the following command: Tabularize /| --> | Metric | Description | | | | | rabbitmqglobalmessagesacknowledgedtotal | Total number of messages acknowledged by consumers | | rabbitmqglobalmessagesconfirmedtotal | Total number of messages confirmed to publishers | | rabbitmqglobalmessagesdeliveredconsumeautoack_total | Total number of messages delivered to consumers using basic.consume with automatic acknowledgment | | rabbitmqglobalmessagesdeliveredconsumemanualack_total | Total number of messages delivered to consumers using basic.consume with manual acknowledgment | | rabbitmqglobalmessagesdeliveredgetautoack_total | Total number of messages delivered to consumers using basic.get with automatic acknowledgment | | rabbitmqglobalmessagesdeliveredgetmanualack_total | Total number of messages delivered to consumers using basic.get with manual acknowledgment | | rabbitmqglobalmessagesdeliveredtotal | Total number of messages delivered to consumers | | rabbitmqglobalmessagesgetempty_total | Total number of times basic.get operations fetched no message | | rabbitmqglobalmessagesreceivedconfirm_total | Total number of messages received from publishers expecting confirmations | | rabbitmqglobalmessagesreceivedtotal | Total number of messages received from publishers | | rabbitmqglobalmessagesredeliveredtotal | Total number of messages redelivered to consumers | | rabbitmqglobalmessagesroutedtotal | Total number of messages routed to queues or streams | | rabbitmqglobalmessagesunroutabledropped_total | Total number of messages published as non-mandatory into an exchange and dropped as unroutable | | rabbitmqglobalmessagesunroutablereturned_total | Total number of messages published as mandatory into an exchange and returned to the publisher as unroutable | | rabbitmqglobalpublishers | Publishers currently connected | | rabbitmqglobalconsumers | Consumers currently connected | | Metric | Description | | | | | rabbitmqglobalmessagesdeadletteredconfirmedtotal | Total number of messages dead-lettered and confirmed by target queues | | rabbitmqglobalmessagesdeadlettereddeliverylimit_total | Total number of messages dead-lettered due to delivery-limit exceeded | | rabbitmqglobalmessagesdeadletteredexpiredtotal | Total number of messages dead-lettered due to message TTL exceeded | | rabbitmqglobalmessagesdeadletteredmaxlentotal | Total number of messages dead-lettered due to overflow drop-head or reject-publish-dlx | | rabbitmqglobalmessagesdeadletteredrejectedtotal | Total number of messages dead-lettered due to basic.reject or

| Metrics `rabbitmqglobalmessagesdeadlettered*` have labels `queuetype` and `deadletterstrategy`. Label `queue_type` denotes the type of queue messages were discarded from. It can have value `rabbitclassicqueue`, `rabbitquorumqueue`, or `rabbitmqttqos0_queue` (Queue type `rabbitstreamqueue` does not dead letter messages.) Note that metrics `rabbitmqglobalmessagesdeadlettered*` with label `queuetype` set to `rabbitquorumqueue` might miss some counter updates in certain failure scenarios, i.e. the reported Prometheus value could be slightly lower than the actual number of messages dead lettered (and confirmed). (This is because in the current implementation quorum queue leaders update the counters asynchronously.) Label `deadletterstrategy` can have value `disabled` if queue has no dead-letter-exchange configured or if configured dead-letter-exchange does not exist implying messages get dropped, or `atmostonce` if queue's configured dead-lettered-exchange exists, or `atleastonce` if queue type is `rabbitquorumqueue` with configured `dead-letter-exchange` and `dead-letter-strategy` set to `at-least-once` and `overflow` set to `reject-publish`. These metrics are specific to the stream

| Metric | Description | | | | | streamerrorstreamdoesnotexisttotal | Total number of commands rejected with stream does not exist error | | streamerrorsubscriptionidalreadyexiststotal | Total number of commands failed with subscription id already exists | | streamerrorsubscriptioniddoesnotexist_total | Total number of commands failed with subscription id does not exist | | streamerrorstreamalreadyexists_total | Total number of commands failed with stream already exists | | streamerrorstreamnotavailable_total | Total number of commands failed with stream not available | | streamerrorsaslmechanismnotsupportedtotal | Total number of commands failed with sasl mechanism not supported | | streamerrorauthenticationfailuretotal | Total number of commands failed with authentication failure | | streamerrorsaslerrortotal | Total number of commands failed with sasl error | | streamerrorsaslchallengetotal | Total number of commands failed with sasl challenge | | streamerrorsaslauthenticationfailureloopbacktotal | Total number of commands failed with sasl authentication failure loopback | | streamerrorvhostaccessfailure_total | Total number of commands failed with vhost access failure | | streamerrorunknownframetotal | Total number of commands failed with unknown frame | | streamerrorframetoolarge_total | Total number of commands failed with frame too large | | streamerrorinternalerrortotal | Total number of commands failed with internal error | | streamerroraccessrefusedtotal | Total number of commands failed with access refused | | streamerrorpreconditionfailedtotal | Total number of commands failed with precondition failed | | streamerrorpublisherdoesnotexisttotal | Total number of commands failed with publisher does not exist | | Metric | Description | | | | | rabbitmqbuildinfo | RabbitMQ & Erlang/OTP version info | | rabbitmqconsumerprefetch | Limit of unacknowledged messages for each consumer | | rabbitmq_consumers | Consumers currently connected | | rabbitmqdiskspaceavailablebytes | Disk space available in bytes | | rabbitmqdiskspaceavailablelimit_bytes | Free disk space low watermark in bytes | | rabbitmqidentityinfo | RabbitMQ node & cluster identity info | | rabbitmqprocessmax_fds | Open file descriptors limit | | rabbitmqprocessmaxtcpsockets | Open TCP sockets limit | | rabbitmqprocessopen_fds | Open file descriptors | | rabbitmqprocessopentcpsockets | Open TCP sockets | | rabbitmqprocessresidentmemorybytes | Memory used in bytes | | rabbitmqresidentmemorylimitbytes | Memory high watermark in bytes | | Metric | Description | | | | | rabbitmqconnectionchannels | Channels on a connection | | rabbitmqconnectionincomingbytestotal | Total number of bytes received on a connection | | rabbitmqconnectionincomingpacketstotal | Total number of packets received on a connection | | rabbitmqconnectionoutgoingbytestotal | Total number of bytes sent on a connection | | rabbitmqconnectionoutgoingpacketstotal | Total number of packets sent on a connection | | rabbitmqconnectionpending_packets | Number of packets waiting to be sent on a connection | | rabbitmqconnectionprocessreductionstotal | Total number of connection process reductions | | rabbitmq_connections | Connections currently open | | rabbitmqconnectionsclosed_total | Total number of connections closed or terminated | | rabbitmqconnectionsopened_total | Total number of connections opened | | Metric | Description | | | | | rabbitmqchannelacks_uncommitted | Message acknowledgements in a transaction not yet committed | | rabbitmqchannelconsumers | Consumers on a channel | | rabbitmqchannelgetacktotal | Total number of messages fetched with basic.get in manual acknowledgement mode | | rabbitmqchannelgetemptytotal | Total number of times basic.get operations fetched no message | | rabbitmqchannelget_total | Total number of messages fetched with

in automatic acknowledgement mode | | rabbitmqchannelmessagesackedtotal | Total number of messages acknowledged by consumers | | rabbitmqchannelmessagesconfirmedtotal | Total number of messages published into an exchange and confirmed on the channel | | rabbitmqchannelmessagesdeliveredack_total | Total number of messages delivered to consumers in manual acknowledgement mode | | rabbitmqchannelmessagesdeliveredtotal | Total number of messages delivered to consumers in automatic acknowledgement mode | | rabbitmqchannelmessagespublishedtotal | Total number of messages published into an exchange on a channel | | rabbitmqchannelmessagesredeliveredtotal | Total number of messages redelivered to consumers | | rabbitmqchannelmessages_unacked | Delivered but not yet acknowledged messages | | rabbitmqchannelmessages_uncommitted | Messages received in a transaction but not yet committed | | rabbitmqchannelmessages_unconfirmed | Published but not yet confirmed messages | | rabbitmqchannelmessagesunroutabledropped_total | Total number of messages published as non-mandatory into an exchange and dropped as unroutable | | rabbitmqchannelmessagesunroutablereturned_total | Total number of messages published as mandatory into an exchange and returned to the publisher as unroutable | | rabbitmqchannelprefetch | Total limit of unacknowledged messages for all consumers on a channel | | rabbitmqchannelprocessreductionstotal | Total number of channel process reductions | | rabbitmq_channels | Channels currently open | | rabbitmqchannelsclosed_total | Total number of channels closed | | rabbitmqchannelsopened_total | Total number of channels opened | | Metric | Description | | | | | rabbitmqqueueconsumer_utilisation | Consumer utilisation | | rabbitmqqueueconsumers | Consumers on a queue | | rabbitmqqueuediskreadstotal | Total number of times queue read messages from disk | | rabbitmqqueuediskwritestotal | Total number of times queue wrote messages to disk | | rabbitmqqueuemessages | Sum of ready and unacknowledged messages - total queue depth | | rabbitmqqueuemessages_bytes | Size in bytes of ready and unacknowledged messages | | rabbitmqqueuemessagespagedout | Messages paged out to disk | | rabbitmqqueuemessagespagedout_bytes | Size in bytes of messages paged out to disk | | rabbitmqqueuemessages_persistent | Persistent messages | | rabbitmqqueuemessagespersistentbytes | Size in bytes of persistent messages | | rabbitmqqueuemessagespublishedtotal | Total number of messages published to queues | | rabbitmqqueuemessages_ram | Ready and unacknowledged messages stored in memory | | rabbitmqqueuemessagesrambytes | Size of ready and unacknowledged messages stored in memory | | rabbitmqqueuemessages_ready | Messages ready to be delivered to consumers | | rabbitmqqueuemessagesreadybytes | Size in bytes of ready messages | | rabbitmqqueuemessagesreadyram | Ready messages stored in memory | | rabbitmqqueuemessages_unacked | Messages delivered to consumers but not yet acknowledged | | rabbitmqqueuemessagesunackedbytes | Size in bytes of all unacknowledged messages | | rabbitmqqueuemessagesunackedram | Unacknowledged messages stored in memory | | rabbitmqqueueprocessmemorybytes | Memory in bytes used by the Erlang queue process | | rabbitmqqueueprocessreductionstotal | Total number of queue process reductions | | rabbitmq_queues | Queues available | | rabbitmqqueuescreated_total | Total number of queues created | | rabbitmqqueuesdeclared_total | Total number of queues declared | | rabbitmqqueuesdeleted_total | Total number of queues deleted | | Metric | Description | | | | | rabbitmqerlanggcreclaimedbytes_totalTotal | number of bytes of memory reclaimed by Erlang garbage collector | | rabbitmqerlanggcrunstotal | Total number of Erlang garbage collector runs | | rabbitmqerlangnetticktimeseconds | Inter-node heartbeat interval in seconds | | rabbitmqerlangprocesses_limit | Erlang processes limit | | rabbitmqerlangprocesses_used | Erlang processes used | | rabbitmqerlangschedulercontextswitches_total | Total number of Erlang scheduler context switches | | rabbitmqerlangschedulerrunqueue | Erlang scheduler run queue | | rabbitmqerlanguptime_seconds | Node uptime | | Metric | Description | | | | | rabbitmqioreadbytestotal | Total number of I/O bytes read | | rabbitmqioreadopstotal | Total number of I/O read operations | | rabbitmqioreadtimeseconds_total | Total I/O read time | | rabbitmqioreopenopstotal | Total number of times files have been reopened | | rabbitmqioseekopstotal | Total number of I/O seek operations | | rabbitmqioseektimeseconds_total | Total I/O seek time | | rabbitmqiosyncopstotal | Total number of I/O sync operations | | rabbitmqiosynctimeseconds_total | Total I/O sync time | | rabbitmqiowritebytestotal | Total number of I/O bytes written | | rabbitmqiowriteopstotal | Total number of I/O write operations | | rabbitmqiowritetimeseconds_total | Total I/O write time | | rabbitmqmsgstorereadtotal | Total number of Message Store read operations | | rabbitmqmsgstorewritetotal | Total number of Message Store write operations | | rabbitmqqueueindexreadops_total | Total number of Queue Index read operations | | rabbitmqqueueindexwriteops_total | Total number of Queue Index write operations | | rabbitmqschemadbdisktx_total | Total number of Schema DB disk transactions | | rabbitmqschemadbramtx_total | Total number of Schema DB memory transactions | | Metric | Description | | | | | rabbitmqraftentrycommitlatency_seconds | Time taken for an entry to be committed | | rabbitmqraftlogcommitindex | Raft log commit index | | rabbitmqraftloglastapplied_index | Raft log last applied index | | rabbitmqraftloglastwritten_index | Raft log last written index | | rabbitmqraftlogsnapshotindex | Raft log snapshot index | | rabbitmqraftterm_total | Current Raft term number | | Metric | Description | | | | | rabbitmqfederationlinks | Federations Links count grouped by Link status | | Metric | Description | | | | | telemetryscrapeduration_seconds | Scrape duration | | telemetryscrapeencodedsizebytes | Scrape size, encoded | | telemetryscrapesize_bytes | Scrape size, not encoded | | Metric | Description | | | | | erlangmnesiacommitted_transactions | Number of committed transactions | | erlangmnesiafailed_transactions | Number of failed

aborted) transactions | | erlangmnesiaheld_locks | Number of held locks | | erlangmnesialock_queue | Number of transactions waiting for a lock | | erlangmnesialogged_transactions | Number of transactions logged | | erlangmnesiarestarted_transactions | Total number of transaction restarts | | erlangmnesiatransaction_coordinators | Number of coordinator transactions | | erlangmnesiatransaction_participants | Number of participant transactions | | Metric | Description | | | | | erlangvmallocators | Allocated (carrierssize) and used (blockssize) memory for the different allocators in the VM. See erts_alloc(3). | | erlangvmatom_count | The number of atom currently existing at the local node. | | erlangvmatom_limit | The maximum number of simultaneously existing atom at the local node. | | erlangvmdirtycpuschedulers | The number of scheduler dirty CPU scheduler threads used by the emulator. | | erlangvmdirtycpuschedulers_online | The number of dirty CPU scheduler threads online. | | erlangvmdirtyioschedulers | The number of scheduler dirty I/O scheduler threads used by the emulator. | | erlangvmdistnodequeuesizebytes | The number of bytes in the output distribution queue. This queue sits between the Erlang code and the port driver. | | erlangvmdistnodestate | The current state of the distribution link. The state is represented as a numerical value where `pending=1', `up_pending=2' and `up=3'. | | erlangvmdistportinput_bytes | The total number of bytes read from the port. | | erlangvmdistportmemory_bytes | The total number of bytes allocated for this port by the runtime system. The port itself can have allocated memory that is not included. | | erlangvmdistportoutput_bytes | The total number of bytes written to the port. | | erlangvmdistportqueuesizebytes | The total number of bytes queued by the port using the ERTS driver queue implementation. | | erlangvmdistprocheapsizewords | The size in words of the youngest heap generation of the process. This generation includes the process stack. This information is highly implementation-dependent, and can change if the implementation changes. | | erlangvmdistprocmemory_bytes | The size in bytes of the process. This includes call stack, heap, and internal structures. | | erlangvmdistprocmessagequeuelen | The number of messages currently in the message queue of the process. | | erlangvmdistprocminbinvheapsizewords | The minimum binary virtual heap size for the process. | | erlangvmdistprocminheapsize_words | The minimum heap size for the process. | | erlangvmdistprocreductions | The number of reductions executed by the process. | | erlangvmdistprocstacksizewords | The stack size, in words, of the process. | | erlangvmdistprocstatus | The current status of the distribution process. The status is represented as a numerical value where `exiting=1', `suspended=2', `runnable=3', `garbage_collecting=4', `running=5' and `waiting=6'. | | erlangvmdistproctotalheapsize_words | The total size, in words, of all heap fragments of the process. This includes the process stack and any unreceived messages that are considered to be part of the heap. | | erlangvmdistrecvavg_bytes | Average size of packets, in bytes, received by the socket. | | erlangvmdistrecvbytes | Number of bytes received by the socket. | | erlangvmdistrecvcnt | Number of packets received by the socket. | | erlangvmdistrecvdvi_bytes | Average packet size deviation, in bytes, received by the socket. | | erlangvmdistrecvmax_bytes | Size of the largest packet, in bytes, received by the

| | erlangvmdistsendavg_bytes | Average size of packets, in bytes, sent from the socket. | | erlangvmdistsendbytes | Number of bytes sent from the socket. | | erlangvmdistsendcnt | Number of packets sent from the socket. | | erlangvmdistsendmax_bytes | Size of the largest packet, in bytes, sent from the socket. | | erlangvmdistsendpend_bytes | Number of bytes waiting to be sent by the socket. | | erlangvmets_limit | The maximum number of ETS tables allowed. | | erlangvmlogical_processors | The detected number of logical processors configured in the system. | | erlangvmlogicalprocessorsavailable | The detected number of logical processors available to the Erlang runtime system. | | erlangvmlogicalprocessorsonline | The detected number of logical processors online on the system. | | erlangvmmemoryatombytes_total | The total amount of memory currently allocated for atoms. This memory is part of the memory presented as system memory. | | erlangvmmemorybytestotal | The total amount of memory currently allocated. This is the same as the sum of the memory size for processes and system. | | erlangvmmemorydetstables | Erlang VM DETS Tables count. | | erlangvmmemoryetstables | Erlang VM ETS Tables count. | | erlangvmmemoryprocessesbytes_total | The total amount of memory currently allocated for the Erlang processes. | | erlangvmmemorysystembytes_total | The total amount of memory currently allocated for the emulator that is not directly related to any Erlang process. Memory presented as processes is not included in this memory. | | erlangvmport_count | The number of ports currently existing at the local node. | | erlangvmport_limit | The maximum number of simultaneously existing ports at the local node. | | erlangvmprocess_count | The number of processes currently existing at the local node. | | erlangvmprocess_limit | The maximum number of simultaneously existing processes at the local node. | | erlangvmschedulers | The number of scheduler threads used by the emulator. | | erlangvmschedulers_online | The number of schedulers online. | | erlangvmsmp_support | 1 if the emulator has been compiled with SMP support, otherwise 0. | | erlangvmstatisticsbytesoutput_total | Total number of bytes output to ports. | | erlangvmstatisticsbytesreceived_total | Total number of bytes received through ports. | | erlangvmstatisticscontextswitches | Total number of context switches since the system started. | | erlangvmstatisticsdirtycpurunqueue_length | Length of the dirty CPU run-queue. | | erlangvmstatisticsdirtyiorunqueue_length | Length of the dirty IO run-queue. | | erlangvmstatisticsgarbagecollectionbytesreclaimed | Garbage collection: bytes reclaimed. | | erlangvmstatisticsgarbagecollectionnumberof_gcs | Garbage collection: number of GCs. | | erlangvmstatisticsgarbagecollectionwordsreclaimed | Garbage collection: words reclaimed. | | erlangvmstatisticsreductionstotal | Total reductions. | | erlangvmstatisticsrunqueues_length | Length of normal run-queues. | | erlangvmstatisticsruntimemilliseconds | The sum of the runtime for all threads in the Erlang runtime system. Can be greater than wall clock time. | | erlangvmstatisticswallclocktimemilliseconds | Information about wall clock. Same as erlangvmstatisticsruntime_milliseconds except that real time is measured. | | erlangvmstatisticswallclocktimemilliseconds | Information about wall clock. Same as erlangvmstatisticsruntime_milliseconds except that real time is measured. | | erlangvmthreadpoolsize | The number of async threads in the async thread pool used for asynchronous driver calls. | | erlangvmthreads | 1 if the emulator has been compiled with thread support, otherwise 0. | | erlangvmtime_correction | 1 if time correction is enabled, otherwise 0. |