监听器(Listeners)

获取集群监听器列表

API 定义:

  1. GET api/v3/listeners/

请求示例:

  1. GET api/v3/listeners/

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "listeners": [
  6. {
  7. "acceptors": 16,
  8. "current_conns": 0,
  9. "listen_on": "8883",
  10. "max_conns": 102400,
  11. "protocol": "mqtt:ssl",
  12. "shutdown_count": [ ]
  13. },
  14. {
  15. "acceptors": 8,
  16. "current_conns": 2,
  17. "listen_on": "0.0.0.0:1883",
  18. "max_conns": 1024000,
  19. "protocol": "mqtt:tcp",
  20. "shutdown_count": {
  21. "closed": 2,
  22. "kicked": 1
  23. }
  24. },
  25. {
  26. "acceptors": 4,
  27. "current_conns": 0,
  28. "listen_on": "127.0.0.1:11883",
  29. "max_conns": 10240000,
  30. "protocol": "mqtt:tcp",
  31. "shutdown_count": [ ]
  32. },
  33. {
  34. "acceptors": 4,
  35. "current_conns": 1,
  36. "listen_on": "18083",
  37. "max_conns": 512,
  38. "protocol": "http:dashboard",
  39. "shutdown_count": [ ]
  40. },
  41. {
  42. "acceptors": 2,
  43. "current_conns": 0,
  44. "listen_on": "8080",
  45. "max_conns": 512,
  46. "protocol": "http:management",
  47. "shutdown_count": [ ]
  48. },
  49. {
  50. "acceptors": 4,
  51. "current_conns": 0,
  52. "listen_on": "8083",
  53. "max_conns": 102400,
  54. "protocol": "mqtt:ws",
  55. "shutdown_count": [ ]
  56. },
  57. {
  58. "acceptors": 4,
  59. "current_conns": 0,
  60. "listen_on": "8084",
  61. "max_conns": 16,
  62. "protocol": "mqtt:wss",
  63. "shutdown_count": [ ]
  64. }
  65. ],
  66. "node": "emqx@127.0.0.1"
  67. }
  68. ]
  69. }

获取节点监听器列表

API 定义:

  1. GET api/v3/nodes/${node}/listeners

请求示例:

  1. GET api/v3/nodes/emqx@127.0.0.1/listeners

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "acceptors": 16,
  6. "current_conns": 0,
  7. "listen_on": "8883",
  8. "max_conns": 102400,
  9. "protocol": "mqtt:ssl",
  10. "shutdown_count": [ ]
  11. },
  12. {
  13. "acceptors": 8,
  14. "current_conns": 2,
  15. "listen_on": "0.0.0.0:1883",
  16. "max_conns": 1024000,
  17. "protocol": "mqtt:tcp",
  18. "shutdown_count": {
  19. "closed": 2,
  20. "kicked": 1
  21. }
  22. },
  23. {
  24. "acceptors": 4,
  25. "current_conns": 0,
  26. "listen_on": "127.0.0.1:11883",
  27. "max_conns": 10240000,
  28. "protocol": "mqtt:tcp",
  29. "shutdown_count": [ ]
  30. },
  31. {
  32. "acceptors": 4,
  33. "current_conns": 1,
  34. "listen_on": "18083",
  35. "max_conns": 512,
  36. "protocol": "http:dashboard",
  37. "shutdown_count": [ ]
  38. },
  39. {
  40. "acceptors": 2,
  41. "current_conns": 0,
  42. "listen_on": "8080",
  43. "max_conns": 512,
  44. "protocol": "http:management",
  45. "shutdown_count": [ ]
  46. },
  47. {
  48. "acceptors": 4,
  49. "current_conns": 0,
  50. "listen_on": "8083",
  51. "max_conns": 102400,
  52. "protocol": "mqtt:ws",
  53. "shutdown_count": [ ]
  54. },
  55. {
  56. "acceptors": 4,
  57. "current_conns": 0,
  58. "listen_on": "8084",
  59. "max_conns": 16,
  60. "protocol": "mqtt:wss",
  61. "shutdown_count": [ ]
  62. }
  63. ]
  64. }