Error logs

List error logs

Introduction

List error logs

URI

GET /admin-api/log_server/errlog

URI parameters

  • node_id

    type: integer

    required: no

    description: ID of node

  • node_type

    type: integer

    required: no

    description: type of error source(0:global,1:admin site,2:log server)

  • level

    type: integer

    required: no

    description: the specified level (return all levels of alarm events if not specified, 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: application ID

  • req_id

    type: integer

    required: no

    description: request ID

  • page

    type: integer

    required: no

    description: page number of the results to fetch (default 1)

  • page_size

    type: integer

    required: no

    description: results per page (default 20)

Request example

Shell

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

Response example

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"
    }]
  }
}