# Metrics

EMQX Broker provides users with metrics monitoring functions, allowing users and operation and maintenance personnel to know the current service status based on these metrics. The metrics monitoring function cannot be disabled. This function has high performance, and users do not need to worry about affecting system performance in high-throughput scenarios.

EMQX Broker provides users with multiple ways to view metrics and status. Most directly, users can see this data on the Overview page of EMQX Dashboard.

Metrics in Dashboard

If it is not convenient to access the Dashboard, they can also obtain these data through HTTP API and system topic messages. You can refer to HTTP API and $SYS system topic.


EMQX provides integration with third-party monitoring systems, such as StatsD and Prometheus. You can refer to Prometheus Monitoring Alarm and StatsD for an example.

# Metrics & Stats

EMQX Broker divides metrics into Metrics and Stats. Metrics usually refer to data that will only increase monotonically, such as the number of sent bytes and the number of sent messages. Metrics currently provided by EMQX Broker covers the four dimensions of bytes, packets, messages, and events. Stats usually refers to data that appears in pairs, including current values and historical maximums, such as the current number of subscriptions and the historical maximum number of subscription.


EMQX 5.0 supports aggregation of monitoring data for the entire cluster, as well as per-node fetching. You can refer to HTTP API

# Metrics

# Bytes

KeyName (in Dashboard)Data TypeDescription
bytes.receivedBytes/ReceivedIntegerNumber of received bytes
bytes.sentBytes/SentIntegerNumber of send bytes

# Packets

KeyName (in Dashboard)Data TypeDescription
packets.receivedPackets/ReceivedIntegerNumber of received packets
packets.sentPackets/SentIntegerNumber of sent packets
packets.connect.receivedPackets/Connect ReceivedIntegerNumber of received CONNECT packets
packets.connack.auth_errorPackets/Connack Auth ErrorIntegerNumber of sent CONNACK messages with reason codes 0x86 and 0x87
packets.connack.errorPackets/Connack ErrorIntegerNumber of sent CONNACK packets where reason code is not 0x00. The value of this indicator is greater than or equal to the value of packets.connack.auth_error
packets.connack.sentPackets/Connack SentIntegerNumber of sent CONNACK packets
packets.publish.receivedPackets/Publish ReceivedIntegerNumber of received PUBLISH packets
packets.publish.sentPackets/Publish SentIntegerNumber of sent PUBLISH packets
packets.publish.inusePackets/Publish InuseIntegerNumber of received PUBLISH packets with occupied packet identifiers
packets.publish.auth_errorPackets/Publish Auth ErrorIntegerNumber of received PUBLISH packets that failed the ACL check
packets.publish.errorPackets/Publish ErrorIntegerNumber of received PUBLISH packets that cannot be published
packets.publish.droppedPackets/Publish DroppedIntegerNumber of PUBLISH packets that were discarded due to the receiving limit
packets.puback.receivedPackets/Puback ReceivedIntegerNumber of received PUBACK packets
packets.puback.sentPackets/Puback SentIntegerNumber of sent PUBACK packets
packets.puback.inusePackets/Puback InuseintegerNumber of received PUBACK messages with occupied identifiers
packets.puback.missedPackets/Puback MissedIntegerNumber of received PUBACK packets with unknown identifiers
packets.pubrec.receivedPackets/Pubrec ReceivedIntegerNumber of received PUBREC packets
packets.pubrec.sentPackets/Pubrec SentIntegerNumber of sent PUBREC packets
packets.pubrec.inusePackets/Pubrec InuseIntegerNumber of received PUBREC messages with occupied identifiers
packets.pubrec.missedPackets/Pubrec MissedIntegerNumber of received PUBREC packets with unknown identifiers
packets.pubrel.receivedPackets/Pubrel ReceivedIntegerNumber of received PUBREL packets
packets.pubrel.sentPackets/Pubrel SentIntegerNumber of sent PUBREL packets
packets.pubrel.missedPackets/Pubrel MissedIntegerNumber of received PUBREL packets with unknown identifiers
packets.pubcomp.receivedPackets/Pubcomp ReceivedIntegerNumber of received PUBCOMP packets
packets.pubcomp.sentPackets/Pubcomp SentIntegerNumber of sent PUBCOMP packets
packets.pubcomp.inusePackets/Pubcomp InuseIntegerNumber of received PUBCOMP messages with occupied identifiers
packets.pubcomp.missedPackets/Pubcomp MissedIntegerNumber of missed PUBCOMP packets
packets.subscribe.receivedPackets/Subscribe ReceivedIntegerNumber of received SUBSCRIBE packets
packets.subscribe.errorPackets/Subscribe ErrorIntegerNumber of received SUBSCRIBE packets with failed subscriptions
packets.subscribe.auth_errorPackets/Subscribe Auth ErrorIntegerNumber of received SUBACK packets that failed the ACL check
packets.suback.sentPackets/Suback SentIntegerNumber of sent SUBACK packets
packets.unsubscribe.receivedPackets/Unsubscribe ReceivedIntegerNumber of received UNSUBSCRIBE packets
packets.unsubscribe.errorPackets/Unsubscribe ErrorIntegerNumber of received UNSUBSCRIBE packets with failed unsubscriptions
packets.unsuback.sentPackets/Unsuback SentIntegerNumber of sent UNSUBACK packets
packets.pingreq.receivedPackets/Pingreq ReceivedIntegerNumber of received PINGREQ packets
packets.pingresp.sentPackets/Pingresp SentIntegerNumber of sent PUBRESP packets
packets.disconnect.receivedPackets/Disconnect ReceivedIntegerNumber of received DISCONNECT packets
packets.disconnect.sentPackets/Disconnect SentIntegerNumber of sent DISCONNECT packets
packets.auth.receivedPackets/Auth ReceivedIntegerNumber of received AUTH packets
packets.auth.sentPackets/Auth SentIntegerNumber of sent AUTH packets

# Message (PUBLISH packet)

KeyName (in Dashboard)Data TypeDescription
delivery.dropped.too_largeDelivery/Dropped Too Large MessagesIntegerThe number of messages that were dropped because the length exceeded the limit when sending
delivery.dropped.queue_fullDelivery/Dropped Messages (Queue Full)IntegerNumber of messages with a non-zero QoS that were dropped because the message queue was full when sending
delivery.dropped.qos0_msgDelivery/Dropped QoS 0 MessagesIntegerNumber of messages with QoS of 0 that were dropped because the message queue was full when sending
delivery.dropped.expiredDelivery/Dropped Expired MessagesIntegerNumber of messages that were dropped due to message expiration when sending
delivery.dropped.no_localDelivery/Dropped No Local MessagesIntegerNumber of messages that were dropped due to the No Local subscription option when sending
delivery.droppedDelivery/DroppedIntegerTotal number of messages that were dropped when sent
messages.delayedMessages/DelayedIntegerNumber of delay-published messages stored by EMQX Broker
messages.deliveredMessages/DeliveredIntegerNumber of messages forwarded to the subscription process internally by EMQX Broker
messages.droppedMessages/DroppedIntegerTotal number of messages dropped by EMQX Broker before forwarding to the subscription process
messages.dropped.no_subscribersMessages/Dropped No SubscribersIntegerNumber of messages dropped due to no subscribers
messages.dropped.await_pubrel_timeoutMessages/Dropped Await Pubrel TimeoutIntegerNumber of messages dropped due to await PUBREL timeout
messages.forwardMessages/ForwadIntegerNumber of messages forwarded to other nodes
messages.publishMessages/PublishIntegerNumber of messages published in addition to system messages
messages.qos0.receivedMessages/QoS 0 ReceivedIntegerNumber of QoS 0 messages received from clients
messages.qos1.receivedMessages/QoS 1 ReceivedIntegerNumber of QoS 2 messages received from clients
messages.qos2.receivedMessages/QoS 2 ReceivedIntegerNumber of QoS 1 messages received from clients
messages.qos0.sentMessages/QoS 0 SentIntegerNumber of QoS 0 messages sent to clients
messages.qos1.sentMessages/QoS 1 SentIntegerNumber of QoS 1 messages sent to clients
messages.qos2.sentMessages/QoS 2 SentIntegerNumber of QoS 2 messages sent to clients
messages.receivedMessages/ReceivedIntegerNumber of messages received from the client, which is equal to the sum of messages.qos0.received,messages.qos1.received, and messages.qos2.received
messages.sentMessages/SentIntegerThe number of messages sent to the client, which is equal to the sum of messages.qos0.sent,messages.qos1.sent, and messages.qos2.sent
messages.ackedMessages/AckedIntegerNumber of acked messages

# Event

KeyName (in Dashboard)Data TypeDescription
client.connectConnections/ConnetIntegerclient.connect hook trigger times
client.authenticateAccess/AuthenticateIntegerclient.authenticate hook trigger times
client.connackConnections/ConnackIntegerclient.connack hook trigger times
client.connectedConnections/ConnectedIntegerclient.connected hook trigger times
client.disconnectedConnections/DisconnectedIntegerclient.disconnected hook trigger times
client.authorizeAccess/AuthorizeIntegerclient.authorize hook trigger times
client.subscribeConnections/SubscribeIntegerclient.subscribe hook trigger times
client.unsubscribeConnections/UnsubscribeIntegerclient.unsubscribe hook trigger times
session.createdSessions/CreatedIntegersession.created hook trigger times
session.discardedSessions/DiscardedIntegersession.discarded hook trigger times
session.resumedSessions/ResumedIntegersession.resumed hook trigger times
session.takenoverSessions/TakenoverIntegersession.takenover hook trigger times
session.terminatedSessions/TerminatedIntegersession.terminated hook trigger times

# Authentication & Authorization

KeyName (in Dashboard)Data TypeDescription
authorization.allowAccess/AllowIntegerNumber of client authorization passes
authorization.denyAccess/DenyIntegerNumber of client authorization failures
authorization.matched.allowAccess/Matched AllowIntegerNumber of client authorization passes due to authorized by some rules
authorization.matched.denyAccess/Matched DenyIntegerNumber of client authorization failures due to being rejected by some rules
authorization.nomatchAccess/No MatchIntegerNumber of client authorization request not be matched any rules
authorization.cache_hitAccess/Cache HitIntegerNumber of client getting authorization result (allow or deny) by cache

# Stats

KeyData TypeDescription
connections.countIntegerCurrent connections
connections.maxIntegerHistorical maximum number of connections
live_connections.countIntegerNumber of currently live connections
live_connections.maxIntegerHistorical maximum number of live connections
channels.countIntegersame as sessions.count
channels.maxIntegersame as sessions.max
sessions.countIntegerNumber of current sessions
sessions.maxIntegerHistorical maximum number of sessions
topics.countIntegerNumber of current topics
topics.maxIntegerHistorical maximum number of topics
suboptions.countIntegersame as subscriptions.count
suboptions.maxIntegersame as subscriptions.max
subscribers.countIntegerNumber of current subscribers
subscribers.maxIntegerHistorical maximum number of subscribers
subscriptions.countIntegerNumber of current subscriptions, including shared subscriptions
subscriptions.maxIntegerHistorical maximum number of subscriptions
subscriptions.shared.countIntegerNumber of current shared subscriptions
subscriptions.shared.maxIntegerHistorical maximum number of shared subscriptions
retained.countIntegerNumber of currently retained messages
retained.maxIntegerHistorical maximum number of retained messages
delayed.countIntegerNumber of currently delayed messages
delayed.maxIntegerHistorical maximum number of delayed messages