错误日志
获取错误日志
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"
}]
}
}