# Metrics

# Statistical Metrics

# URI

POST /metrics

# Request Message

None

# Response Message:

NameTypeDescription
codeInteger0
dataArray of ObjectsList of statistical metrics on each node
data[0].nodeStringNode name
data[0].metricsObjectMonitoring metrics data, see metrics below

metrics:

NameTypeDescription
actions.failureIntegerNumber of failure executions of the rule engine action
actions.successIntegerNumber of successful executions of the rule engine action
bytes.receivedIntegerNumber of bytes received by EMQ X Broker
bytes.sentIntegerNumber of bytes sent by EMQ X Broker on this connection
client.authenticateIntegerNumber of client authentications
client.auth.anonymousIntegerNumber of clients who log in anonymously
client.connectIntegerNumber of client connections
client.connackIntegerNumber of CONNACK packet sent
client.connectedIntegerNumber of successful client connections
client.disconnectedIntegerNumber of client disconnects
client.check_aclIntegerNumber of ACL rule checks
client.subscribeIntegerNumber of client subscriptions
client.unsubscribeIntegerNumber of client unsubscriptions
delivery.dropped.too_largeIntegerThe number of messages that were dropped because the length exceeded the limit when sending
delivery.dropped.queue_fullIntegerNumber of messages with a non-zero QoS that were dropped because the message queue was full when sending
delivery.dropped.qos0_msgIntegerNumber of messages with QoS 0 that were dropped because the message queue was full when sending
delivery.dropped.expiredIntegerNumber of messages dropped due to message expiration on sending
delivery.dropped.no_localIntegerNumber of messages that were dropped due to the No Local subscription option when sending
delivery.droppedIntegerTotal number of discarded messages when sending
messages.delayedIntegerNumber of delay- published messages stored by EMQ X Broker
messages.deliveredIntegerNumber of messages forwarded to the subscription process internally by EMQ X Broker
messages.droppedIntegerTotal number of messages dropped by EMQ X Broker before forwarding to the subscription process
messages.dropped.expiredIntegerNumber of messages dropped due to message expiration when receiving
messages.dropped.no_subscribersIntegerNumber of messages dropped due to no subscribers
messages.forwardIntegerNumber of messages forwarded to other nodes
messages.publishIntegerNumber of messages published in addition to system messages
messages.qos0.receivedIntegerNumber of QoS 0 messages received from clients
messages.qos2.receivedIntegerNumber of QoS 1 messages received from clients
messages.qos1.receivedIntegerNumber of QoS 2 messages received from clients
messages.qos0.sentIntegerNumber of QoS 0 messages sent to clients
messages.qos1.sentIntegerNumber of QoS 1 messages sent to clients
messages.qos2.sentIntegerNumber of QoS 2 messages sent to clients
messages.receivedIntegerNumber of messages received from the client, equal to the sum of messages.qos0.receivedmessages.qos1.received and messages.qos2.received
messages.sentIntegerNumber of messages sent to the client, equal to the sum of messages.qos0.sentmessages.qos1.sent and messages.qos2.sent
messages.retainedIntegerNumber of retained messages stored by EMQ X Broker
messages.ackedIntegerNumber of received PUBACK and PUBREC packet
packets.receivedIntegerNumber of received packet
packets.sentIntegerNumber of sent packet
packets.connect.receivedIntegerNumber of received CONNECT packet
packets.connack.auth_errorIntegerNumber of received CONNECT packet with failed authentication
packets.connack.errorIntegerNumber of received CONNECT packet with unsuccessful connections
packets.connack.sentIntegerNumber of sent CONNACK packet
packets.publish.receivedIntegerNumber of received PUBLISH packet
packets.publish.sentIntegerNumber of sent PUBLISH packet
packets.publish.inuseIntegerNumber of received PUBLISH packet with occupied identifiers
packets.publish.auth_errorIntegerNumber of received PUBLISH packets with failed the ACL check
packets.publish.errorIntegerNumber of received PUBLISH packet that cannot be published
packets.publish.droppedIntegerNumber of messages discarded due to the receiving limit
packets.puback.receivedIntegerNumber of received PUBACK packet
packets.puback.sentIntegerNumber of sent PUBACK packet
packets.puback.inuseIntegerNumber of received PUBACK packet with occupied identifiers
packets.puback.missedIntegerNumber of received packet with identifiers.
packets.pubrec.receivedIntegerNumber of received PUBREC packet
packets.pubrec.sentIntegerNumber of sent PUBREC packet
packets.pubrec.inuseIntegerNumber of received PUBREC packet with occupied identifiers
packets.pubrec.missedIntegerNumber of received PUBREC packet with unknown identifiers
packets.pubrel.receivedIntegerNumber of received PUBREL packet
packets.pubrel.sentIntegerNumber of sent PUBREL packet
packets.pubrel.missedIntegerNumber of received PUBREC packet with unknown identifiers
packets.pubcomp.receivedIntegerNumber of received PUBCOMP packet
packets.pubcomp.sentIntegerNumber of sent PUBCOMP packet
packets.pubcomp.inuseIntegerNumber of received PUBCOMP packet with occupied identifiers
packets.pubcomp.missedIntegerNumber of missed PUBCOMP packet
packets.subscribe.receivedIntegerNumber of received SUBSCRIBE packet
packets.subscribe.errorIntegerNumber of received SUBSCRIBE packet with failed subscriptions
packets.subscribe.auth_errorIntegerNumber of received SUBACK packet with failed ACL check
packets.suback.sentIntegerNumber of sent SUBACK packet
packets.unsubscribe.receivedIntegerNumber of received UNSUBSCRIBE packet
packets.unsubscribe.errorIntegerNumber of received UNSUBSCRIBE packet with failed unsubscriptions
packets.unsuback.sentIntegerNumber of sent UNSUBACK packet
packets.pingreq.receivedIntegerNumber of received PINGREQ packet
packets.pingresp.sentIntegerNumber of sent PUBRESP packet
packets.disconnect.receivedIntegerNumber of received DISCONNECT packet
packets.disconnect.sentIntegerNumber of sent DISCONNECT packet
packets.auth.receivedIntegerNumber of received AUTH packet
packets.auth.sentIntegerNumber of sent AUTH packet
rules.matchedIntegerNumber of rule matched
session.createdIntegerNumber of sessions created
session.discardedIntegerNumber of sessions dropped because Clean Session or Clean Start is true
session.resumedIntegerNumber of sessions resumed because Clean Session or Clean Start is false
session.takeoveredIntegerNumber of sessions takeovered because Clean Session or Clean Start is false
session.terminatedIntegerNumber of terminated sessions

# Request Example

$ curl -i --basic -u j11c5ff1:qc47fd11fccf1644 -X GET "https://lacd0b7b.test-cn.emqx.cloud:8443/api/metrics"
1
{
"data": [
{
"node": "emqx@10.12.50.91",
"metrics": {
"actions.error": 0,
"messages.qos1.received": 0,
"client.disconnected": 9,
"client.subscribe": 15,
"packets.pingreq.received": 0,
"packets.publish.dropped": 0,
"delivery.dropped": 0,
"packets.pubrel.received": 0,
"actions.retry": 0,
"packets.pubcomp.missed": 0,
"delivery.dropped.qos0_msg": 0,
"delivery.dropped.queue_full": 0,
"client.connack": 11,
"messages.delayed": 0,
"packets.sent": 311,
"actions.success": 0,
"messages.retained": 5,
"packets.pubcomp.inuse": 0,
"session.resumed": 0,
"messages.qos0.sent": 5,
"session.terminated": 9,
"bytes.sent": 824,
"packets.connect.received": 11,
"packets.pubrec.received": 0,
"client.authenticate": 11,
"packets.pubrec.missed": 0,
"packets.unsuback.sent": 1,
"packets.pubrel.sent": 0,
"messages.delivered": 5,
"messages.qos2.received": 0,
"messages.received": 4,
"messages.qos1.sent": 0,
"packets.subscribe.received": 15,
"messages.dropped": 0,
"client.acl.ignore": 17,
"packets.connack.error": 1,
"packets.auth.received": 0,
"session.takeovered": 0,
"client.auth.anonymous": 0,
"packets.auth.sent": 0,
"packets.unsubscribe.received": 1,
"delivery.dropped.no_local": 0,
"messages.acked": 0,
"packets.pingresp.sent": 279,
"messages.qos0.received": 4,
"delivery.dropped.too_large": 0,
"actions.exception": 0,
"actions.taken": 0,
"packets.disconnect.sent": 0,
"packets.disconnect.received": 7,
"packets.pubrec.inuse": 0,
"client.connected": 10,
"client.acl.deny": 0,
"packets.publish.error": 0,
"messages.sent": 5,
"messages.publish": 4,
"client.unsubscribe": 1,
"packets.pubrel.missed": 0,
"packets.received": 38,
"bytes.received": 1448,
"packets.subscribe.error": 0,
"messages.qos2.sent": 0,
"client.auth.failure": 1,
"packets.publish.auth_error": 0,
"client.auth.success": 10,
"delivery.dropped.expired": 0,
"rules.matched": 0,
"client.acl.allow": 0,
"packets.unsubscribe.error": 0,
"client.connect": 11,
"packets.pubcomp.sent": 0,
"packets.puback.received": 0,
"packets.pubcomp.received": 0,
"session.created": 10,
"packets.connack.sent": 11,
"packets.puback.missed": 0,
"messages.dropped.expired": 0,
"messages.dropped.no_subscribers": 0,
"packets.publish.sent": 5,
"packets.suback.sent": 15,
"packets.pubrec.sent": 0,
"packets.puback.sent": 0,
"packets.publish.inuse": 0,
"packets.connack.auth_error": 0,
"messages.forward": 2,
"session.discarded": 0,
"packets.puback.inuse": 0,
"packets.publish.received": 4,
"client.check_acl": 17,
"client.auth.ignore": 0,
"packets.subscribe.auth_error": 0
}
},
{
"node": "emqx@10.12.50.36",
"metrics": {
"actions.error": 0,
"messages.qos1.received": 0,
"client.disconnected": 3,
"client.subscribe": 2,
"packets.pingreq.received": 0,
"packets.publish.dropped": 0,
"delivery.dropped": 0,
"packets.pubrel.received": 0,
"actions.retry": 0,
"packets.pubcomp.missed": 0,
"delivery.dropped.qos0_msg": 0,
"delivery.dropped.queue_full": 0,
"client.connack": 3,
"messages.delayed": 0,
"packets.sent": 55,
"actions.success": 0,
"messages.retained": 5,
"packets.pubcomp.inuse": 0,
"session.resumed": 0,
"messages.qos0.sent": 2,
"session.terminated": 3,
"bytes.sent": 188,
"packets.connect.received": 3,
"packets.pubrec.received": 0,
"client.authenticate": 3,
"packets.pubrec.missed": 0,
"packets.unsuback.sent": 0,
"packets.pubrel.sent": 0,
"messages.delivered": 2,
"messages.qos2.received": 0,
"messages.received": 2,
"messages.qos1.sent": 0,
"packets.subscribe.received": 2,
"messages.dropped": 1,
"client.acl.ignore": 2,
"packets.connack.error": 0,
"packets.auth.received": 0,
"session.takeovered": 0,
"client.auth.anonymous": 0,
"packets.auth.sent": 0,
"packets.unsubscribe.received": 0,
"delivery.dropped.no_local": 0,
"messages.acked": 0,
"packets.pingresp.sent": 48,
"messages.qos0.received": 2,
"delivery.dropped.too_large": 0,
"actions.exception": 0,
"actions.taken": 0,
"packets.disconnect.sent": 0,
"packets.disconnect.received": 2,
"packets.pubrec.inuse": 0,
"client.connected": 3,
"client.acl.deny": 0,
"packets.publish.error": 0,
"messages.sent": 2,
"messages.publish": 2,
"client.unsubscribe": 0,
"packets.pubrel.missed": 0,
"packets.received": 7,
"bytes.received": 249,
"packets.subscribe.error": 0,
"messages.qos2.sent": 0,
"client.auth.failure": 0,
"packets.publish.auth_error": 0,
"client.auth.success": 3,
"delivery.dropped.expired": 0,
"rules.matched": 0,
"client.acl.allow": 0,
"packets.unsubscribe.error": 0,
"client.connect": 3,
"packets.pubcomp.sent": 0,
"packets.puback.received": 0,
"packets.pubcomp.received": 0,
"session.created": 3,
"packets.connack.sent": 3,
"packets.puback.missed": 0,
"messages.dropped.expired": 0,
"messages.dropped.no_subscribers": 1,
"packets.publish.sent": 2,
"packets.suback.sent": 2,
"packets.pubrec.sent": 0,
"packets.puback.sent": 0,
"packets.publish.inuse": 0,
"packets.connack.auth_error": 0,
"messages.forward": 1,
"session.discarded": 0,
"packets.puback.inuse": 0,
"packets.publish.received": 0,
"client.check_acl": 2,
"client.auth.ignore": 0,
"packets.subscribe.auth_error": 0
}
}
],
"code": 0
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197