# logs

Log file API.
Set management node URL:

# GET /logs

Get a stream of log events.

# Parameters

  • serverintegerqueryoptionalFilter by server, omit this to get logs from all servers.
  • servicearrayqueryoptionalFilter by systemd unit name, omit this to get logs from all services. The following names are special cased to map to the appropriate unit names: kernel,croit,hagroup,mon,mgr,mds,radosgw,iscsi,smb,osd.*,osd.<id>
  • priorityarrayqueryoptionalPriorities to include as syslog levels, 0 = highest, 7 = lowest.
  • afternumberqueryoptionalUnix timestamp for the earliest log entry. Required if before is set to a concrete time.
  • beforenumberqueryoptionalUnix timestamp for the latest log entry. Set to -1 to follow the log stream. If this is set to a concrete time, then after must also be set.
  • linesintegerqueryoptionalMaximum number of lines to return. Will be ignored if an explicit time range is given with before and after. Controls the number of lines to go back from the current time when following a stream (i.e., before == -1), but it will still return more if more events occur.

# Endpoint

curl -X GET http://mgmt-node:8080/api/logs?server=0&service=string&priority=0&after=&before=&lines=0

# Response 200

  • typeobjectoptional-
    • typeNamestringoptional-
  • closedbooleanoptional-

# Example response

{
  "type": {
    "typeName": "string"
  },
  "closed": true
}

# GET /logs/logs

Get log events from a server as JSON.

# Parameters

  • serverintegerqueryoptionalFilter by server, omit this to get logs from all servers.
  • servicearrayqueryoptionalFilter by systemd unit name, omit this to get logs from all services. The following names are special cased to map to the appropriate unit names: kernel,croit,hagroup,mon,mgr,mds,radosgw,iscsi,samba,osd.*,osd.<id>
  • priorityarrayqueryoptionalPriorities to include as syslog levels, 0 = highest, 7 = lowest.
  • afternumberqueryoptionalUnix timestamp for the earliest log entry. Required if before is set to a concrete time.
  • beforenumberqueryoptionalUnix timestamp for the latest log entry.
  • linesintegerqueryoptionalMaximum number of lines to return.
  • cursorstringqueryoptionalContinue after a given journal cursor as returned by a previous call.

# Endpoint

curl -X GET http://mgmt-node:8080/api/logs/logs?server=0&service=string&priority=0&after=&before=&lines=0&cursor=string

# Response 200

  • cstringoptionalCursor for next requests.
  • tnumberoptionalUnix timestamp.
  • mstringoptionalLog message.
  • sstringoptionalService that generated this message, see o field for further information for OSD services.
  • hintegeroptionalId of the host generating this message.
  • pintegeroptionalPriority as syslog level, 0 = highest, 7 = lowest

# Example response

[
  {
    "c": "string",
    "t": ,
    "m": "string",
    "s": "string",
    "h": 0,
    "p": 0
  }
]