告警信息

获取集群当前告警信息

API 定义:

  1. GET api/v3/alarms/present

请求示例:

  1. GET api/v3/alarms/present

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "alarms": [],
  6. "node": "emqx@127.0.0.1"
  7. }
  8. ]
  9. }

获取节点当前告警信息

API 定义:

  1. GET api/v3/alarms/present/${node}

请求示例:

  1. GET api/v3/alarms/present/emqx@127.0.0.1

返回数据:

  1. {
  2. "code": 0,
  3. "data": []
  4. }

获取集群历史告警信息

API 定义:

  1. GET api/v3/alarms/history

请求示例:

  1. GET api/v3/alarms/history

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "alarms": [
  6. {
  7. "clear_at": "2019-07-10 16:54:35",
  8. "desc": "82.60344181007542",
  9. "id": "cpu_high_watermark"
  10. }
  11. ],
  12. "node": "emqx@127.0.0.1"
  13. }
  14. ]
  15. }

获取节点历史告警信息

API 定义:

  1. GET api/v3/alarms/present/${node}

请求示例:

  1. GET api/v3/alarms/present/emqx@127.0.0.1

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "clear_at": "2019-07-10 16:54:35",
  6. "desc": "82.60344181007542",
  7. "id": "cpu_high_watermark"
  8. }
  9. ]
  10. }