錯誤日誌

獲取錯誤日誌

URI

GET /admin-api/log_server/errlog

URI 引數

  • node_id

    type: integer

    required: no

    description: 節點 ID

  • node_type

    type: integer

    required: no

    description: 錯誤來源型別(0:全域性,1:Admin 站點,2:Log Server)

  • level

    type: integer

    required: no

    description: 指定的級別 (不指定返回所有級別的報警日誌,0:STDERR,1:EMERG,2:ALERT,3:CRIT,4:ERROR,5:WARN,6:NOTICE,7:INFO,8:DEBUG)

  • app_id

    type: integer

    required: no

    description: 應用 ID

  • req_id

    type: integer

    required: no

    description: 請求 ID

  • page

    type: integer

    required: no

    description: 指定頁面 (預設為 1)

  • page_size

    type: integer

    required: no

    description: 每頁包含資料的數量 (預設為 20)

請求示例

Shell

curl http://{admin-site}/admin-api/log_server/errlog/?page=1&page_size=10&node_id=&level=2&node_type=0&app_id=

響應示例

Status: 200 OK
{
  "time": 1614984056,
  "status": 0,
  "data": {
    "meta": {
      "count": 1
    },
    "data": [{
      "level": 2,
      "count": 1,
      "id": 108807123,
      "src": 81,
      "log_time": 1614032610,
      "log": "sendto() failed (22: Invalid argument), udp client: 51.222.39.203, server: 0.0.0.0:53"
    }]
  }
}