systopics.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. $SYS Topics
  2. ===========
  3. $SYS Topics of broker is started with::
  4. $SYS/brokers/${node}
  5. ${node} is erlang node name of clustered brokers. For example::
  6. $SYS/brokers/emqttd@host1/version
  7. $SYS/brokers/emqttd@host2/version
  8. Broker $SYS Topics
  9. ------------------
  10. Topic | Description
  11. -------------------------------|------------
  12. $SYS/brokers | Broker nodes
  13. $SYS/brokers/${node}/version | Broker Version
  14. $SYS/brokers/${node}/uptime | Broker Uptime
  15. $SYS/brokers/${node}/datetime | Broker DateTime
  16. $SYS/brokers/${node}/sysdescr | Broker Description
  17.  
  18. Client $SYS Topics
  19. ------------------
  20. Start with: $SYS/brokers/${node}/clients/
  21. Topic | Payload(json) | Description
  22. ----------------------|---------------------|---------------
  23. ${clientid}/connected | {ipaddress: "127.0.0.1", username: "test", session: false, version: 3, connack: 0, ts: 1432648482} | Publish when client connected
  24. ${clientid}/disconnected | {reason: "normal" | "keepalive_timeout" | "conn_closed"}
  25. Parameters of 'connected' Payload::
  26. ipaddress: "127.0.0.1",
  27. username: "test",
  28. session: false,
  29. protocol: 3,
  30. connack: 0,
  31. ts: 1432648482
  32. Parameters of 'disconnected' Payload::
  33. reason: normal,
  34. ts: 1432648486
  35. Statistics $SYS Topics
  36. ----------------------
  37. Start with '$SYS/brokers/${node}/stats/'
  38. Client Stats
  39. ----------------------
  40. Topic | Description
  41. -------------------------------------|------------
  42. clients/count | count of current connected clients
  43. clients/max | max connected clients in the same time
  44. Session Stats
  45. ----------------------
  46. Topic | Description
  47. -----------------|------------
  48. sessions/count | count of current sessions
  49. sessions/max | max number of sessions
  50. Subscriber Stats
  51. ----------------------
  52. Topic | Description
  53. ------------------|------------
  54. subscriptions/count | count of current subscriptions
  55. subscriptions/max | max number of subscriptions
  56. Topic Stats
  57. ----------------------
  58. Topic | Description
  59. ------------------|------------
  60. topics/count | count of current topics
  61. topics/max | max number of topics
  62. Queue Stats
  63. ----------------------
  64. Topic | Description
  65. ------------------|------------
  66. queues/count | count of current queues
  67. queues/max | max number of queues
  68. Metrics $SYS Topics
  69. ----------------------
  70. Start with '$SYS/brokers/${node}/metrics/'
  71. Bytes sent and received
  72. ----------------------
  73. Topic | Description
  74. ------------------------------------|------------
  75. bytes/received | MQTT Bytes Received since broker started
  76. bytes/sent | MQTT Bytes Sent since the broker started
  77. Packets sent and received
  78. -------------------------
  79. Topic | Description
  80. -------------------------|------------
  81. packets/received | MQTT Packets received
  82. packets/sent | MQTT Packets sent
  83. packets/connect | MQTT CONNECT Packet received
  84. packets/connack | MQTT CONNACK Packet sent
  85. packets/publish/received | MQTT PUBLISH packets received
  86. packets/publish/sent | MQTT PUBLISH packets sent
  87. packets/subscribe | MQTT SUBSCRIBE Packets received
  88. packets/suback | MQTT SUBACK packets sent
  89. packets/unsubscribe | MQTT UNSUBSCRIBE Packets received
  90. packets/unsuback | MQTT UNSUBACK Packets sent
  91. packets/pingreq | MQTT PINGREQ packets received
  92. packets/pingresp | MQTT PINGRESP Packets sent
  93. packets/disconnect | MQTT DISCONNECT Packets received
  94. Messages sent and received
  95. ---------------------------
  96. Topic | Description
  97. ---------------------------------------|-------------------
  98. messages/received | Messages Received
  99. messages/sent | Messages Sent
  100. messages/retained | Messages Retained
  101. messages/stored | TODO: Messages Stored
  102. messages/dropped | Messages Dropped
  103. Alarm Topics
  104. ---------------------------
  105. Start with '$SYS/brokers/${node}/alarms/'
  106. Topic | Description
  107. -----------------|-------------------
  108. ${alarmId}/alert | New Alarm
  109. ${alarmId}/clear | Clear Alarm
  110. Logs
  111. ---------------------------
  112. '$SYS/brokers/${node}/logs/${severity}'
  113. Severity | Description
  114. -----------|-------------------
  115. debug | Debug Log
  116. info | Info Log
  117. notice | Notice Log
  118. warning | Warning Log
  119. error | Error Log
  120. critical | Critical Log
  121. Sysmon
  122. ---------------------------
  123. Start with '$SYS/brokers/${node}/sysmon/'
  124. Topic | Description
  125. -----------------|-------------------
  126. long_gc | Long GC Warning
  127. long_schedule | Long Schedule
  128. large_heap | Large Heap Warning
  129. busy_port | Busy Port Warning
  130. busy_dist_port | Busy Dist Port
  131. Logs(TODO)
  132. ---------------------------
  133. '$SYS/brokers/${node}/log/${severity}'
  134. Severity | Description
  135. ------------|-------------------
  136. debug | Debug
  137. info | Info Log
  138. notice | Notice Log
  139. warning | Warning Log
  140. error | Error Log
  141. critical | Critical Log
  142. alert | Alert Log
  143. VM Load Topics(TODO)
  144. ---------------------------
  145. Start with '$SYS/brokers/${node}/vm/'
  146. Topic | Description
  147. -----------------|-------------------
  148. memory/* | TODO
  149. cpu/* | TODO
  150. processes/* | TODO
  151. Sys Interval
  152. ---------------------------
  153. sys_interval: 1 minute default